Skip updating options for hidden file-dialog
authorRobin Gareus <robin@gareus.org>
Tue, 6 Nov 2018 21:43:36 +0000 (22:43 +0100)
committerRobin Gareus <robin@gareus.org>
Tue, 6 Nov 2018 22:00:26 +0000 (23:00 +0100)
This may also fix an edge-case issue where changing track selection
combined with invalid file selection may trigger a bad_file_message.

gtk2_ardour/sfdb_ui.cc

index fcd8510d925d3cf04174183c5c8758dc8b220549..2c4d5b4db673bd8209a3e2658c3570bacfecead3 100644 (file)
@@ -855,6 +855,7 @@ void
 SoundFileBrowser::on_show ()
 {
        ArdourWindow::on_show ();
+       reset_options ();
        start_metering ();
 }
 
@@ -2028,13 +2029,15 @@ SoundFileOmega::reset (uint32_t selected_audio_tracks, uint32_t selected_midi_tr
                chooser.set_filter (audio_and_midi_filter);
        }
 
-       reset_options ();
+       if (is_visible()) {
+               reset_options ();
+       }
 }
 
 void
 SoundFileOmega::file_selection_changed ()
 {
-       if (resetting_ourselves) {
+       if (resetting_ourselves || !is_visible ()) {
                return;
        }