fix display of preferences window when detached.
authorPaul Davis <paul@linuxaudiosystems.com>
Sat, 27 Aug 2016 10:02:28 +0000 (06:02 -0400)
committerPaul Davis <paul@linuxaudiosystems.com>
Sat, 27 Aug 2016 10:02:52 +0000 (06:02 -0400)
GTK+ apparently unpacks/hides a widget whose requistion at window show/packing time is negative for x or y axes. The RC option editor
was being created AFTER its Tabbable self packed it into its own window (when detached), and GTK+ rejected it because the
treeview had a size requisition with -1 for width.

So build it first, then call Tabbable::set_state() later

gtk2_ardour/rc_option_editor.cc

index 7596c6fb530f5f95ba8acafa878bc87e30a62619..63aaf0d597aa8da1c7f2a05cd40aa285bb30f11b 100644 (file)
@@ -1860,14 +1860,6 @@ RCOptionEditor::RCOptionEditor ()
         , _rc_config (Config)
        , _mixer_strip_visibility ("mixer-element-visibility")
 {
-       XMLNode* node = ARDOUR_UI::instance()->preferences_settings();
-       if (node) {
-               /* gcc4 complains about ambiguity with Gtk::Widget::set_state
-                  (Gtk::StateType) here !!!
-               */
-               Tabbable::set_state (*node, Stateful::loading_state_version);
-       }
-
        UIConfiguration::instance().ParameterChanged.connect (sigc::mem_fun (*this, &RCOptionEditor::parameter_changed));
 
        /* MISC */
@@ -3368,6 +3360,14 @@ if (!ARDOUR::Profile->get_mixbus()) {
        parameter_changed ("sync-source");
        parameter_changed ("use-monitor-bus");
        parameter_changed ("open-gui-after-adding-plugin");
+
+       XMLNode* node = ARDOUR_UI::instance()->preferences_settings();
+       if (node) {
+               /* gcc4 complains about ambiguity with Gtk::Widget::set_state
+                  (Gtk::StateType) here !!!
+               */
+               Tabbable::set_state (*node, Stateful::loading_state_version);
+       }
 }
 
 void