]> SALOME platform Git repositories - modules/shaper.git/blobdiff - src/SHAPERGUI/SHAPERGUI_ToolbarsMgr.cpp
Salome HOME
Provide show new and delete obsolete commands in toolbars.
[modules/shaper.git] / src / SHAPERGUI / SHAPERGUI_ToolbarsMgr.cpp
index 673bab04eec7f8409a38fb6294c87b5098e6f92f..e1e6b11377ea91e04ec699078225f9e450a08f2a 100644 (file)
@@ -82,7 +82,7 @@ SHAPERGUI_ToolbarsDlg::SHAPERGUI_ToolbarsDlg(SHAPERGUI* theModule)
   myModule(theModule),
   myResult(theModule->shaperToolbars())
 {
-  myFreeCommands = getModuleFreeCommands();
+  myFreeCommands = theModule->getFreeCommands();
 
   setWindowTitle(tr("Toolbars"));
   QVBoxLayout* aMailLayout = new QVBoxLayout(this);
@@ -211,23 +211,6 @@ void SHAPERGUI_ToolbarsDlg::updateToolbarsList()
   myToolbarsList->addItems(aItems);
 }
 
-QIntList SHAPERGUI_ToolbarsDlg::getModuleFreeCommands() const
-{
-  QIntList aFreeCommands;
-  QtxActionToolMgr* aMgr = myModule->toolMgr();
-  QAction* anAction;
-  int aId;
-  QMap<QString, QIntList>::const_iterator aIt;
-  QIntList aShaperActions = myModule->shaperActions();
-  foreach(int aCmd, aShaperActions) {
-    anAction = myModule->action(aCmd);
-    aId = aMgr->actionId(anAction);
-    if (!aMgr->containsAction(aId))
-      aFreeCommands.append(aCmd);
-  }
-  return aFreeCommands;
-}
-
 
 void SHAPERGUI_ToolbarsDlg::onDoubleClick(const QModelIndex& theIdx)
 {