From 3c4025d000dc3b883e0bb24725adb79ef5c79455 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Sat, 27 Aug 2016 06:02:28 -0400 Subject: 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 --- gtk2_ardour/rc_option_editor.cc | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'gtk2_ardour') 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 -- cgit v1.2.3