]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Issue #1383 Preview button: using Config_FeatureMessage instead of list of parameters.
authornds <nds@opencascade.com>
Tue, 12 Apr 2016 10:54:32 +0000 (13:54 +0300)
committernds <nds@opencascade.com>
Tue, 12 Apr 2016 10:54:56 +0000 (13:54 +0300)
src/XGUI/XGUI_ActionsMgr.cpp
src/XGUI/XGUI_Workshop.cpp
src/XGUI/XGUI_WorkshopListener.cpp

index 89c0d002fb0ab58e6f43b087602cb381865bd6f5..f5e19cc92b8cd2a3b8036e772c6c812413b5185e 100644 (file)
@@ -367,7 +367,7 @@ void XGUI_ActionsMgr::updateByDocumentKind()
     }
 #else
     AppElements_Command* aCmd = dynamic_cast<AppElements_Command*>(eachAction);
-    aCmdDocKind = aCmd->documentKind();
+    aCmdDocKind = QString::fromStdString(aCmd->featureMessage()->documentKind());
 #endif
     if(!aCmdDocKind.isEmpty() && aCmdDocKind != aDocKind) {
       eachAction->setEnabled(false);
index 75de3174c1dcee76aeccae7f357bb40172a20d8f..82fd1bcf4848a2b5ffc850b02b770fdfa94e73a8 100755 (executable)
@@ -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);
index 3d1d5c70fda4845d7210d90b553233b29ea80b10..51b2d7405614e8119bdfed95450d720263346853 100755 (executable)
@@ -536,11 +536,7 @@ void XGUI_WorkshopListener::addFeature(const std::shared_ptr<Config_FeatureMessa
   if(aHotKey != aFeatureInfo.shortcut) {
     aFeatureInfo.shortcut = aHotKey;
   }
-  // Create feature...
-  AppElements_Command* aCommand = aGroup->addFeature(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()) {