mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-11 09:06:33 +01:00
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
1 changed files with 13 additions and 4 deletions
|
|
@ -1053,6 +1053,8 @@ SoundFileOmega::reset_options ()
|
||||||
string existing_choice;
|
string existing_choice;
|
||||||
vector<string> action_strings;
|
vector<string> action_strings;
|
||||||
|
|
||||||
|
resetting_ourselves = true;
|
||||||
|
|
||||||
if (chooser.get_filter() == &audio_filter) {
|
if (chooser.get_filter() == &audio_filter) {
|
||||||
|
|
||||||
/* AUDIO */
|
/* AUDIO */
|
||||||
|
|
@ -1084,7 +1086,7 @@ SoundFileOmega::reset_options ()
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
/* MIDI */
|
/* MIDI ONLY */
|
||||||
|
|
||||||
if (selected_midi_track_cnt > 0) {
|
if (selected_midi_track_cnt > 0) {
|
||||||
action_strings.push_back (importmode2string (ImportToTrack));
|
action_strings.push_back (importmode2string (ImportToTrack));
|
||||||
|
|
@ -1095,8 +1097,6 @@ SoundFileOmega::reset_options ()
|
||||||
action_strings.push_back (importmode2string (ImportAsRegion));
|
action_strings.push_back (importmode2string (ImportAsRegion));
|
||||||
action_strings.push_back (importmode2string (ImportAsTapeTrack));
|
action_strings.push_back (importmode2string (ImportAsTapeTrack));
|
||||||
|
|
||||||
resetting_ourselves = true;
|
|
||||||
|
|
||||||
existing_choice = action_combo.get_active_text();
|
existing_choice = action_combo.get_active_text();
|
||||||
|
|
||||||
set_popdown_strings (action_combo, action_strings);
|
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_audio_track_cnt = selected_audio_tracks;
|
||||||
selected_midi_track_cnt = selected_midi_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 ();
|
reset_options ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue