diff libgui/src/main-window.cc @ 17090:1d544ac39369

show correct undock-button of widgets when window layout is resetted * octave_dock_widget.cc(make_widget): optional parameter indicating if widget has to be docked to the main window or just reparented (default true) * octave_dock_widget.h: optional parameter for make_widget, default true * main_window.cc(set_window_layout): call make_widget (only for reparenting) when widget is should not be floating but has no parent
author Torsten <ttl@justmail.de>
date Fri, 26 Jul 2013 06:53:17 +0200
parents ceca3e65a8fe
children 47b504503a3f
line wrap: on
line diff
--- a/libgui/src/main-window.cc	Fri Jul 26 00:38:56 2013 -0400
+++ b/libgui/src/main-window.cc	Fri Jul 26 06:53:17 2013 +0200
@@ -557,7 +557,7 @@
           if (floating)
             widget->make_window ();
           else if (! widget->parent ())  // should not be floating but is
-            widget->setParent (this);    // reparent
+            widget->make_widget (false); // no docking, just reparent
 
           // restore geometry
           QVariant val = settings->value (name);
@@ -569,7 +569,10 @@
           if (floating && visible)              // floating and visible
             float_and_visible.append (widget);  // not show before main win
           else
-            widget->setVisible (visible);       // not floating -> show
+            {
+              widget->make_widget ();
+              widget->setVisible (visible);       // not floating -> show
+            }
         }
     }