Salome HOME
An additional minor fix based on the issue #2917 issue script: to update some kind...
[modules/shaper.git] / src / XGUI / XGUI_PropertyPanel.cpp
index d2c31c08fbf1cfeabae4474c8bb61c350e48b869..65180f91a4761a0aea3893114e149fb32a6c600f 100644 (file)
@@ -225,10 +225,20 @@ void XGUI_PropertyPanel::createContentPanel(FeaturePtr theFeature)
     /// Apply button should be update if the feature was modified by the panel
     myOperationMgr->onValidateOperation();
   }
-  std::shared_ptr<Config_FeatureMessage> aFeatureInfo =
-    myOperationMgr->workshop()->featureInfo(theFeature->getKind().c_str());
-  if (aFeatureInfo.get())
-    findButton(PROP_PANEL_OK_PLUS)->setVisible(aFeatureInfo->isApplyContinue());
+  updateApplyPlusButton(theFeature);
+}
+
+void XGUI_PropertyPanel::updateApplyPlusButton(FeaturePtr theFeature)
+{
+  if (theFeature.get()) {
+    std::shared_ptr<Config_FeatureMessage> aFeatureInfo =
+      myOperationMgr->workshop()->featureInfo(theFeature->getKind().c_str());
+    if (aFeatureInfo.get()) {
+      findButton(PROP_PANEL_OK_PLUS)->setVisible(aFeatureInfo->isApplyContinue());
+      return;
+    }
+  }
+  findButton(PROP_PANEL_OK_PLUS)->setVisible(false);
 }
 
 ModuleBase_ModelWidget* XGUI_PropertyPanel::activeWidget(const bool isUseCustomWidget) const