fix restoration of editor pane positions
authorPaul Davis <paul@linuxaudiosystems.com>
Thu, 3 Mar 2016 17:02:35 +0000 (12:02 -0500)
committerPaul Davis <paul@linuxaudiosystems.com>
Tue, 31 May 2016 19:30:39 +0000 (15:30 -0400)
gtk2_ardour/editor.cc

index c5d99c69bf1e58fc32156d172105b93cfdf737e4..ab9ac43b280e3b735d2c5c18db2a0ee84510254e 100644 (file)
@@ -3913,7 +3913,7 @@ Editor::pane_allocation_handler (Allocation &alloc, Paned* which)
        int pos;
        XMLProperty const * prop;
        char buf[32];
-       XMLNode* node = ARDOUR_UI::instance()->editor_settings();
+       XMLNode* geometry = ARDOUR_UI::instance()->editor_settings();
 
        enum Pane {
                Horizontal = 0x1,
@@ -3922,8 +3922,6 @@ Editor::pane_allocation_handler (Allocation &alloc, Paned* which)
 
        static Pane done;
 
-       XMLNode* geometry = find_named_node (*node, "geometry");
-
        if (which == static_cast<Paned*> (&edit_pane)) {
 
                if (done & Horizontal) {
@@ -3942,7 +3940,7 @@ Editor::pane_allocation_handler (Allocation &alloc, Paned* which)
                        pos = atoi (prop->value());
                }
 
-               if (GTK_WIDGET(edit_pane.gobj())->allocation.width > pos) {
+               if (edit_pane.get_allocation().get_width() > pos) {
                        edit_pane.set_position (pos);
                }
 
@@ -3963,7 +3961,7 @@ Editor::pane_allocation_handler (Allocation &alloc, Paned* which)
                        pos = atoi (prop->value());
                }
 
-               if (GTK_WIDGET(editor_summary_pane.gobj())->allocation.height > pos) {
+               if (editor_summary_pane.get_allocation().get_height() > pos) {
                        editor_summary_pane.set_position (pos);
                }