changeset 28005:4ee66fda87fb

fix losing foxus when redocking a previously tabbed widget * octave-dock-widget.cc (make_window): uncomment a previously commented command to remove the widget from the main window, which is currently undocked
author Torsten Lilge <ttl-octave@mailbox.org>
date Sun, 26 Jan 2020 10:29:18 +0100
parents 403df0b32204
children 91316b5dc5a2
files libgui/src/octave-dock-widget.cc
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/libgui/src/octave-dock-widget.cc	Sat Jan 25 16:56:27 2020 -0500
+++ b/libgui/src/octave-dock-widget.cc	Sun Jan 26 10:29:18 2020 +0100
@@ -290,7 +290,10 @@
     if (isFloating ())
       setFloating (false);
 
-// Remove after thorough testing 3/20/18    m_parent->removeDockWidget (this);
+    // Before making it a separate (no more parent) floating widget, remove
+    // the dock widget from the main window. This ensures that tabbed widgets
+    // keep their focus when it is re-docked later
+    m_parent->removeDockWidget (this);
 
     setParent (0, Qt::CustomizeWindowHint | Qt::WindowTitleHint |
                Qt::WindowMinMaxButtonsHint | Qt::WindowCloseButtonHint | Qt::Window);