changeset 23224:73f7ef7169ac

Make uimenu "Position" property Matlab-compatible (bug #50369). * Menu.cc (Menu::Menu, Menu::update, Menu::updateSiblingPositions): Don't skip objects which belong to "builtinMenu" when processing uimenus. * Figure.cc: Correct typo in comment "mennubar" -> "menubar".
author Rik <rik@octave.org>
date Thu, 23 Feb 2017 16:08:44 -0800
parents 4b642b593ec2
children e4d01cf67473
files libgui/graphics/Figure.cc libgui/graphics/Menu.cc
diffstat 2 files changed, 5 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/libgui/graphics/Figure.cc	Thu Feb 23 14:55:39 2017 -0800
+++ b/libgui/graphics/Figure.cc	Thu Feb 23 16:08:44 2017 -0800
@@ -766,7 +766,7 @@
             switch (xevent->type ())
               {
               case QEvent::ActionChanged:
-                // The mennubar may have been resized if no action is visible
+                // The menubar may have been resized if no action is visible
                 {
                   QAction* a = dynamic_cast<QActionEvent*> (xevent)->action ();
                   if (m_menuBar->sizeHint ().height () != m_previousHeight
--- a/libgui/graphics/Menu.cc	Thu Feb 23 14:55:39 2017 -0800
+++ b/libgui/graphics/Menu.cc	Thu Feb 23 16:08:44 2017 -0800
@@ -115,7 +115,7 @@
             int count = 0;
 
             foreach (QAction* a, m_parent->actions ())
-              if (! a->isSeparator () && a->objectName () != "builtinMenu")
+              if (! a->isSeparator ())
                 count++;
 
             up.get_property ("position").set
@@ -129,7 +129,7 @@
 
             foreach (QAction* a, m_parent->actions ())
               {
-                if (! a->isSeparator () && a->objectName () != "builtinMenu")
+                if (! a->isSeparator ())
                   {
                     count++;
                     if (pos <= count)
@@ -234,7 +234,7 @@
 
               foreach (QAction* a, m_parent->actions ())
                 {
-                  if (! a->isSeparator () && a->objectName () != "builtinMenu")
+                  if (! a->isSeparator ())
                     {
                       count++;
                       if (pos <= count)
@@ -304,7 +304,7 @@
 
         foreach (QAction* a, m_parent->actions ())
           {
-            if (! a->isSeparator () && a->objectName () != "builtinMenu")
+            if (! a->isSeparator ())
               {
                 Object* aObj = Object::fromQObject (a);