changeset 26820:0a383bddfb40

Also update uitbale position when figure is (un)maximized (bug #53709) * Table.[h,cc] (Table::Table): Set qobject name for further triage. (Table::redraw): Reimplement Object::redraw to update the uitable position. * Figure.cc (Figure::redraw): Call slotRedraw on uitable widgets aswell.
author Pantxo Diribarne <pantxo.diribarne@gmail.com>
date Sun, 03 Mar 2019 18:19:12 +0100
parents 670ebc29ec69
children f9b10a8a7c93
files libgui/graphics/Figure.cc libgui/graphics/Table.cc libgui/graphics/Table.h
diffstat 3 files changed, 10 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/libgui/graphics/Figure.cc	Sun Mar 03 17:15:37 2019 +0100
+++ b/libgui/graphics/Figure.cc	Sun Mar 03 18:19:12 2019 +0100
@@ -335,7 +335,8 @@
       {
         if (qobj->objectName () == "UIPanel"
             || qobj->objectName () == "UIButtonGroup"
-            || qobj->objectName () == "UIControl")
+            || qobj->objectName () == "UIControl"
+            || qobj->objectName () == "UITable")
           {
             Object *obj = Object::fromQObject (qobj);
 
--- a/libgui/graphics/Table.cc	Sun Mar 03 17:15:37 2019 +0100
+++ b/libgui/graphics/Table.cc	Sun Mar 03 18:19:12 2019 +0100
@@ -442,6 +442,7 @@
     : Object (go, tableWidget), m_tableWidget (tableWidget), m_curData (),
       m_blockUpdates (false)
   {
+    qObject ()->setObjectName ("UItable");
     uitable::properties& tp = properties<uitable> ();
 
     m_curData = octave_value (tp.get_data ());
@@ -863,6 +864,12 @@
   }
 
   void
+  Table::redraw (void)
+  {
+    update (uitable::properties::ID_POSITION);
+  }
+
+  void
   Table::update (int pId)
   {
     uitable::properties& tp = properties<uitable> ();
--- a/libgui/graphics/Table.h	Sun Mar 03 17:15:37 2019 +0100
+++ b/libgui/graphics/Table.h	Sun Mar 03 18:19:12 2019 +0100
@@ -50,7 +50,7 @@
 
   protected:
     void update (int pId);
-    //void redraw (void);
+    void redraw (void);
     void updateColumnname (void);
     void updateColumnwidth (void);
     void updateData (void);