Salome HOME
Fix management of "local" actions - they should not be added to the top level main...
authorvsr <vsr@opencascade.com>
Mon, 5 Jun 2017 09:58:12 +0000 (12:58 +0300)
committervsr <vsr@opencascade.com>
Mon, 5 Jun 2017 09:58:12 +0000 (12:58 +0300)
src/CAM/CAM_Module.cxx
src/SUIT/SUIT_Application.cxx

index 6a8e49f3628e2d33e76c4d7c649c7ad2d534792a..b886d8f5520bfb725c01f3ab87adb7815a2308ee 100755 (executable)
@@ -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;
index 75d32cfc62397d7cb5ab859886bed5ab0f15e958..06d9180ed8138cd4a388437a8f8014578d1d4de2 100644 (file)
@@ -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;