From: vsr Date: Mon, 5 Jun 2017 09:58:12 +0000 (+0300) Subject: Fix management of "local" actions - they should not be added to the top level main... X-Git-Tag: V8_3_asterstudy_v0.8.2~1 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=a7f2944c07c79261089eaada6623b06be20ffe89;p=modules%2Fgui.git Fix management of "local" actions - they should not be added to the top level main window in case if shortcut context is set to specific widget. --- diff --git a/src/CAM/CAM_Module.cxx b/src/CAM/CAM_Module.cxx index 6a8e49f36..b886d8f55 100755 --- a/src/CAM/CAM_Module.cxx +++ b/src/CAM/CAM_Module.cxx @@ -1027,7 +1027,9 @@ int CAM_Module::registerAction( const int id, QAction* a ) if ( toolMgr() ) toolMgr()->registerAction( a ); - if ( application() && application()->desktop() ) + if ( application() && application()->desktop() && + a->shortcutContext() != Qt::WidgetShortcut && + a->shortcutContext() != Qt::WidgetWithChildrenShortcut ) application()->desktop()->addAction( a ); return ident; diff --git a/src/SUIT/SUIT_Application.cxx b/src/SUIT/SUIT_Application.cxx index 75d32cfc6..06d9180ed 100644 --- a/src/SUIT/SUIT_Application.cxx +++ b/src/SUIT/SUIT_Application.cxx @@ -693,7 +693,8 @@ int SUIT_Application::registerAction( const int id, QAction* a ) if ( desktop() && desktop()->toolMgr() ) desktop()->toolMgr()->registerAction( a ); - if ( desktop() ) + if ( desktop() && a->shortcutContext() != Qt::WidgetShortcut && + a->shortcutContext() != Qt::WidgetWithChildrenShortcut ) desktop()->addAction( a ); return ident;