Plugin UI state should of course be saved per-session rather than globally.
[ardour.git] / gtk2_ardour / ardour_ui.cc
index 837dfd9ba2b0c4301c68146db1b0490d8cd98632..2cf6c8aaae0cf1c696950906afbb3d6b0e0be014 100644 (file)
@@ -2100,6 +2100,16 @@ ARDOUR_UI::snapshot_session (bool switch_to_it)
 void
 ARDOUR_UI::save_state (const string & name, bool switch_to_it)
 {
+       XMLNode* node = new XMLNode (X_("UI"));
+
+       for (list<WindowProxyBase*>::iterator i = _window_proxies.begin(); i != _window_proxies.end(); ++i) {
+               if (!(*i)->rc_configured()) {
+                       node->add_child_nocopy (*((*i)->get_state ()));
+               }
+       }
+
+       _session->add_extra_xml (*node);
+       
        save_state_canfail (name, switch_to_it);
 }