engine-dialog: properly restore previous active state
authorRobin Gareus <robin@gareus.org>
Thu, 19 Jun 2014 17:42:46 +0000 (19:42 +0200)
committerRobin Gareus <robin@gareus.org>
Thu, 19 Jun 2014 17:44:15 +0000 (19:44 +0200)
gtk2_ardour/engine_dialog.cc

index a89ddddb1a9ec7e5ff295ef4c0055bd96922f446..997620889592dcd3692a0a13c9c00114593fe7dc 100644 (file)
@@ -273,11 +273,15 @@ 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());
 
+       if (audio_setup)
        {
+               set_state (*audio_setup);
+       }
+       {
+               /* ignore: don't save state */
                PBD::Unwinder<uint32_t> protect_ignore_changes (ignore_changes, ignore_changes + 1);
                backend_changed ();
        }
-       maybe_display_saved_state();
 
        /* Connect to signals */
 
@@ -292,10 +296,6 @@ EngineControl::EngineControl ()
        input_channels.signal_changed().connect (sigc::mem_fun (*this, &EngineControl::parameter_changed));
        output_channels.signal_changed().connect (sigc::mem_fun (*this, &EngineControl::parameter_changed));
 
-       if (audio_setup) {
-               set_state (*audio_setup);
-       }
-
        notebook.signal_switch_page().connect (sigc::mem_fun (*this, &EngineControl::on_switch_page));
 }