From: Paul Davis Date: Sat, 27 Aug 2016 10:02:28 +0000 (-0400) Subject: fix display of preferences window when detached. X-Git-Tag: 5.2~17 X-Git-Url: https://main.carlh.net/gitweb/?p=ardour.git;a=commitdiff_plain;h=3c4025d000dc3b883e0bb24725adb79ef5c79455 fix display of preferences window when detached. 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 --- diff --git a/gtk2_ardour/rc_option_editor.cc b/gtk2_ardour/rc_option_editor.cc index 7596c6fb53..63aaf0d597 100644 --- a/gtk2_ardour/rc_option_editor.cc +++ b/gtk2_ardour/rc_option_editor.cc @@ -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