Reset the "default track" flag for all tracks of a type when "default track" is enabled for a track.

This commit is contained in:
Moritz Bunkus 2003-11-05 15:15:08 +00:00
parent 02b68ae1d1
commit a9155887c6
2 changed files with 23 additions and 2 deletions

View File

@ -1,3 +1,13 @@
2003-11-05 Moritz Bunkus <moritz@bunkus.org>
* mmg: bug fix: When 'default track' is selected then all other
tracks of the same type will have their 'default track' flag
cleared.
* mkvmerge: SPU packets belonging to the same timecode are grouped
together, and the duration is extracted directly from the SPU
stream.
2003-10-29 Moritz Bunkus <moritz@bunkus.org>
* mkvmerge: The VobSubs are now stripped of the MPEG program

View File

@ -609,11 +609,22 @@ void tab_input::on_track_enabled(wxCommandEvent &evt) {
}
void tab_input::on_default_track_clicked(wxCommandEvent &evt) {
uint32_t i, k;
mmg_track_t *t;
if ((selected_file == -1) || (selected_track == -1))
return;
(*files[selected_file].tracks)[selected_track].default_track =
cb_default->GetValue();
t = &(*files[selected_file].tracks)[selected_track];
t->default_track = cb_default->GetValue();
if (cb_default->GetValue())
for (i = 0; i < files.size(); i++) {
if (i != selected_file)
for (k = 0; k < files[i].tracks->size(); k++)
if ((k != selected_track) &&
((*files[i].tracks)[k].type == t->type))
(*files[i].tracks)[k].default_track = false;
}
}
void tab_input::on_aac_is_sbr_clicked(wxCommandEvent &evt) {