Salome HOME
updated copyright message
[modules/gui.git] / src / SUIT / SUIT_Application.cxx
index 75d32cfc62397d7cb5ab859886bed5ab0f15e958..331f0fb691d20967fb856c547eed604650608ad2 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2016  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2023  CEA, EDF, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -399,6 +399,16 @@ int SUIT_Application::createTool( const int id, const QString& tBar, const int i
   return intId != -1 ? id : -1;
 }
 
+/*!
+  Clears given toolbar.
+  \param title - title of toolbar
+*/
+void SUIT_Application::clearTool( const QString& title )
+{
+  if ( desktop() && desktop()->toolMgr() )
+    desktop()->toolMgr()->clear( title );
+}
+
 /*!
   Creates new menu item
   \return identificator of new action in menu manager
@@ -693,7 +703,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;