From: nds Date: Tue, 12 Apr 2016 10:54:32 +0000 (+0300) Subject: Issue #1383 Preview button: using Config_FeatureMessage instead of list of parameters. X-Git-Tag: V_2.3.0~242 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=e53096696dd4e72fc8dbc46f3a7aa370a5bb1fc7;p=modules%2Fshaper.git Issue #1383 Preview button: using Config_FeatureMessage instead of list of parameters. --- diff --git a/src/XGUI/XGUI_ActionsMgr.cpp b/src/XGUI/XGUI_ActionsMgr.cpp index 89c0d002f..f5e19cc92 100644 --- a/src/XGUI/XGUI_ActionsMgr.cpp +++ b/src/XGUI/XGUI_ActionsMgr.cpp @@ -367,7 +367,7 @@ void XGUI_ActionsMgr::updateByDocumentKind() } #else AppElements_Command* aCmd = dynamic_cast(eachAction); - aCmdDocKind = aCmd->documentKind(); + aCmdDocKind = QString::fromStdString(aCmd->featureMessage()->documentKind()); #endif if(!aCmdDocKind.isEmpty() && aCmdDocKind != aDocKind) { eachAction->setEnabled(false); diff --git a/src/XGUI/XGUI_Workshop.cpp b/src/XGUI/XGUI_Workshop.cpp index 75de3174c..82fd1bcf4 100755 --- a/src/XGUI/XGUI_Workshop.cpp +++ b/src/XGUI/XGUI_Workshop.cpp @@ -489,7 +489,7 @@ void XGUI_Workshop::setPropertyPanel(ModuleBase_Operation* theOperation) #else AppElements_MainMenu* aMenuBar = mainWindow()->menuObject(); AppElements_Command* aCommand = aMenuBar->feature(aFeatureKind.c_str()); - bool anIsAutoPreview = aCommand && aCommand->isAutoPreview(); + bool anIsAutoPreview = aCommand && aCommand->featureMessage()->isAutoPreview(); #endif if (!anIsAutoPreview) { myPropertyPanel->findButton(PROP_PANEL_PREVIEW)->setVisible(true); diff --git a/src/XGUI/XGUI_WorkshopListener.cpp b/src/XGUI/XGUI_WorkshopListener.cpp index 3d1d5c70f..51b2d7405 100755 --- a/src/XGUI/XGUI_WorkshopListener.cpp +++ b/src/XGUI/XGUI_WorkshopListener.cpp @@ -536,11 +536,7 @@ void XGUI_WorkshopListener::addFeature(const std::shared_ptraddFeature(aFeatureInfo, - aDocKind, - aNestedFeatures, - theMessage->isAutoPreview()); + AppElements_Command* aCommand = aGroup->addFeature(theMessage); // Enrich created button with accept/abort buttons if necessary AppElements_Button* aButton = aCommand->button(); if (aButton->isColumnButton()) {