when resetting the import dialog based on selceted track counts, change the file chooser filter to match a clear selection of a a particular track type (#4880)
git-svn-id: svn://localhost/ardour2/branches/3.0@12351 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
efbeb2dd1a
commit
e47dfc0c1e
@ -1053,6 +1053,8 @@ SoundFileOmega::reset_options ()
|
||||
string existing_choice;
|
||||
vector<string> action_strings;
|
||||
|
||||
resetting_ourselves = true;
|
||||
|
||||
if (chooser.get_filter() == &audio_filter) {
|
||||
|
||||
/* AUDIO */
|
||||
@ -1081,10 +1083,10 @@ SoundFileOmega::reset_options ()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
} else {
|
||||
|
||||
/* MIDI */
|
||||
/* MIDI ONLY */
|
||||
|
||||
if (selected_midi_track_cnt > 0) {
|
||||
action_strings.push_back (importmode2string (ImportToTrack));
|
||||
@ -1095,8 +1097,6 @@ SoundFileOmega::reset_options ()
|
||||
action_strings.push_back (importmode2string (ImportAsRegion));
|
||||
action_strings.push_back (importmode2string (ImportAsTapeTrack));
|
||||
|
||||
resetting_ourselves = true;
|
||||
|
||||
existing_choice = action_combo.get_active_text();
|
||||
|
||||
set_popdown_strings (action_combo, action_strings);
|
||||
@ -1583,6 +1583,15 @@ SoundFileOmega::reset (uint32_t selected_audio_tracks, uint32_t selected_midi_tr
|
||||
{
|
||||
selected_audio_track_cnt = selected_audio_tracks;
|
||||
selected_midi_track_cnt = selected_midi_tracks;
|
||||
|
||||
if (selected_audio_track_cnt == 0 && selected_midi_track_cnt > 0) {
|
||||
chooser.set_filter (midi_filter);
|
||||
} else if (selected_midi_track_cnt == 0 && selected_audio_track_cnt > 0) {
|
||||
chooser.set_filter (audio_filter);
|
||||
} else {
|
||||
chooser.set_filter (audio_and_midi_filter);
|
||||
}
|
||||
|
||||
reset_options ();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user