diff libgui/graphics/Figure.cc @ 26816:92ecc4a97b5c

Properly redraw uixx objects after Qt figure is (un)maximized (bug #53709) * BaseControl.[f,cc] (BaseControl::BaseControl): Set QObject name for further triage. (BaseControl::redraw): New method that forces an update of the position * Panel.cc (Panel::redraw): Force an update of the position. * ButtonGroup.cc (ButtonGroup::redraw): Ditto.
author Pantxo Diribarne <pantxo.diribarne@gmail.com>
date Thu, 28 Feb 2019 23:06:25 +0100
parents 278ae90567a7
children 0a383bddfb40
line wrap: on
line diff
--- a/libgui/graphics/Figure.cc	Sat Mar 02 11:08:53 2019 -0800
+++ b/libgui/graphics/Figure.cc	Thu Feb 28 23:06:25 2019 +0100
@@ -330,13 +330,14 @@
     if (canvas)
       canvas->redraw ();
 
-    foreach (QFrame *frame,
-             qWidget<QWidget> ()->findChildren<QFrame*> ())
+    foreach (QObject *qobj,
+             qWidget<QWidget> ()->findChildren<QObject*> ())
       {
-        if (frame->objectName () == "UIPanel"
-            || frame->objectName () == "UIButtonGroup")
+        if (qobj->objectName () == "UIPanel"
+            || qobj->objectName () == "UIButtonGroup"
+            || qobj->objectName () == "UIControl")
           {
-            Object *obj = Object::fromQObject (frame);
+            Object *obj = Object::fromQObject (qobj);
 
             if (obj)
               obj->slotRedraw ();