]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
Issue 0019893 : support menus ID by action() method
authorvsr <vsr@opencascade.com>
Wed, 22 Oct 2008 07:16:41 +0000 (07:16 +0000)
committervsr <vsr@opencascade.com>
Wed, 22 Oct 2008 07:16:41 +0000 (07:16 +0000)
src/SALOME_PYQT/SALOME_PYQT_GUI/SALOME_PYQT_Module.cxx

index 39b570b2bc07b558290089a66b5b92be453dd3c3..123403555a6a6fda77e40623872b802127283713 100644 (file)
@@ -1596,7 +1596,13 @@ QAction* SALOME_PYQT_Module::separator()
 */
 QAction* SALOME_PYQT_Module::action( const int id ) const
 {
-  return SalomeApp_Module::action( id );
+  QAction* a = SalomeApp_Module::action( id );
+  if ( !a ) {
+    // try menu
+    QMenu* m = menuMgr()->findMenu( id );
+    if ( m ) a = m->menuAction();
+  }
+  return a;
 }
 
 /*!