fix pathscanner / stl_vector related memory leaks
[ardour.git] / gtk2_ardour / engine_dialog.cc
index b50b24e899133d4917271cc5249ffb7565abbf0b..41b48b911c0c410f8b46114736a80d0ed2ad0e0c 100644 (file)
@@ -275,7 +275,11 @@ EngineControl::EngineControl ()
        ARDOUR::AudioEngine::instance()->Stopped.connect (stopped_connection, MISSING_INVALIDATOR, boost::bind (&EngineControl::engine_stopped, this), gui_context());
        ARDOUR::AudioEngine::instance()->Halted.connect (stopped_connection, MISSING_INVALIDATOR, boost::bind (&EngineControl::engine_stopped, this), gui_context());
 
-       backend_changed ();
+       {
+               PBD::Unwinder<uint32_t> protect_ignore_changes (ignore_changes, ignore_changes + 1);
+               backend_changed ();
+       }
+       maybe_display_saved_state();
 
        /* Connect to signals */
 
@@ -798,8 +802,13 @@ EngineControl::list_devices ()
                output_latency.set_sensitive (false);
                input_channels.set_sensitive (false);
                output_channels.set_sensitive (false);
-               ok_button->set_sensitive (false);
-               apply_button->set_sensitive (false);
+               if (_have_control) {
+                       ok_button->set_sensitive (false);
+                       apply_button->set_sensitive (false);
+               } else {
+                       ok_button->set_sensitive (true);
+                       apply_button->set_sensitive (true);
+               }
        }
 }