From: vsr Date: Wed, 22 Oct 2008 07:16:41 +0000 (+0000) Subject: Issue 0019893 : support menus ID by action() method X-Git-Tag: V5_1_0a3~6 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=f8618359d423d5cf01a01feeb6f137f9c81c4477;p=modules%2Fgui.git Issue 0019893 : support menus ID by action() method --- diff --git a/src/SALOME_PYQT/SALOME_PYQT_GUI/SALOME_PYQT_Module.cxx b/src/SALOME_PYQT/SALOME_PYQT_GUI/SALOME_PYQT_Module.cxx index 39b570b2b..123403555 100644 --- a/src/SALOME_PYQT/SALOME_PYQT_GUI/SALOME_PYQT_Module.cxx +++ b/src/SALOME_PYQT/SALOME_PYQT_GUI/SALOME_PYQT_Module.cxx @@ -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; } /*!