X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FXGUI%2FXGUI_Workshop.cpp;h=533efe7bffa9180fe642f509c1a3b810331dd765;hb=64fc7e4fdd63997ec7a502b233ef5f88186d5bbb;hp=2eed6244bd48e6ea2292ea36323f3d94a28e5c36;hpb=b263f22d52ccb191c4fad8f7455d9714a3024514;p=modules%2Fshaper.git diff --git a/src/XGUI/XGUI_Workshop.cpp b/src/XGUI/XGUI_Workshop.cpp index 2eed6244b..533efe7bf 100644 --- a/src/XGUI/XGUI_Workshop.cpp +++ b/src/XGUI/XGUI_Workshop.cpp @@ -131,7 +131,6 @@ XGUI_Workshop::XGUI_Workshop(XGUI_SalomeConnector* theConnector) myOperationMgr = new XGUI_OperationMgr(this, 0); myActionsMgr = new XGUI_ActionsMgr(this); myErrorDlg = new XGUI_ErrorDialog(QApplication::desktop()); - myErrorMgr = new XGUI_ErrorMgr(this); myContextMenuMgr = new XGUI_ContextMenuMgr(this); connect(myContextMenuMgr, SIGNAL(actionTriggered(const QString&, bool)), this, SLOT(onContextMenuCommand(const QString&, bool))); @@ -145,6 +144,7 @@ XGUI_Workshop::XGUI_Workshop(XGUI_SalomeConnector* theConnector) ModuleBase_IWorkshop* aWorkshop = moduleConnector(); myOperationMgr->setWorkshop(aWorkshop); + myErrorMgr = new XGUI_ErrorMgr(this, aWorkshop); myEventsListener = new XGUI_WorkshopListener(aWorkshop); connect(myOperationMgr, SIGNAL(operationStarted(ModuleBase_Operation*)), @@ -392,7 +392,7 @@ void XGUI_Workshop::onAcceptActionClicked() } //****************************************************** -void XGUI_Workshop::onValidationStateChanged(bool theEnabled) +/*void XGUI_Workshop::onValidationStateChanged(bool theEnabled) { XGUI_OperationMgr* anOperationMgr = operationMgr(); if (anOperationMgr) { @@ -403,7 +403,7 @@ void XGUI_Workshop::onValidationStateChanged(bool theEnabled) myErrorMgr->updateActionState(anAction, aFOperation->feature(), theEnabled); } } -} +}*/ //****************************************************** @@ -418,6 +418,24 @@ void XGUI_Workshop::deactivateActiveObject(const ObjectPtr& theObject, const boo } } +//****************************************************** +bool XGUI_Workshop::isFeatureOfNested(const FeaturePtr& theFeature) +{ + bool aHasNested = false; + std::string aFeatureKind = theFeature->getKind(); + if (isSalomeMode()) { + XGUI_SalomeConnector* aSalomeConnector = salomeConnector(); + if (aSalomeConnector->isFeatureOfNested(actionsMgr()->action(aFeatureKind.c_str()))) + aHasNested = true; + } else { + AppElements_MainMenu* aMenuBar = mainWindow()->menuObject(); + AppElements_Command* aCommand = aMenuBar->feature(aFeatureKind.c_str()); + if (aCommand && aCommand->button()->additionalButtonWidget()) + aHasNested = true; + } + return aHasNested; +} + //****************************************************** void XGUI_Workshop::onOperationStarted(ModuleBase_Operation* theOperation) { @@ -979,8 +997,8 @@ void XGUI_Workshop::createDockWidgets() connect(myPropertyPanel, SIGNAL(noMoreWidgets()), myModule, SLOT(onNoMoreWidgets())); connect(myPropertyPanel, SIGNAL(keyReleased(QKeyEvent*)), myOperationMgr, SLOT(onKeyReleased(QKeyEvent*))); - connect(myOperationMgr, SIGNAL(validationStateChanged(bool)), - this, SLOT(onValidationStateChanged(bool))); + //connect(myOperationMgr, SIGNAL(validationStateChanged(bool)), + // this, SLOT(onValidationStateChanged(bool))); } //******************************************************