From f8618359d423d5cf01a01feeb6f137f9c81c4477 Mon Sep 17 00:00:00 2001 From: vsr Date: Wed, 22 Oct 2008 07:16:41 +0000 Subject: [PATCH] Issue 0019893 : support menus ID by action() method --- src/SALOME_PYQT/SALOME_PYQT_GUI/SALOME_PYQT_Module.cxx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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; } /*! -- 2.39.2