Salome HOME
Merge branch 'Dev_1.1.0' of newgeom:newgeom.git into Dev_1.1.0
[modules/shaper.git] / src / XGUI / XGUI_Workshop.cpp
index 07624e29aa6d37b00beb9c1e9af70aaa2bb4569b..34d3a42bfbe5a826135e622e71170bcb204b303e 100644 (file)
@@ -652,13 +652,10 @@ void XGUI_Workshop::setPropertyPanel(ModuleBase_Operation* theOperation)
 
   QList<ModuleBase_ModelWidget*> aWidgets = aFactory.getModelWidgets();
   foreach (ModuleBase_ModelWidget* aWidget, aWidgets) {
-    aWidget->setFeature(theOperation->feature());
+    bool isStoreValue = !theOperation->isEditOperation() &&
+                        aWidget->isValueDefault() && !aWidget->isComputedDefault();
+    aWidget->setFeature(theOperation->feature(), isStoreValue);
     aWidget->enableFocusProcessing();
-    QObject::connect(aWidget, SIGNAL(valuesChanged()), this, SLOT(onWidgetValuesChanged()));
-    // Init default values
-    if (!theOperation->isEditOperation() && aWidget->isValueDefault() && !aWidget->isComputedDefault()) {
-      aWidget->storeValue();
-    }
   }
   
   myPropertyPanel->setModelWidgets(aWidgets);
@@ -1279,24 +1276,6 @@ void XGUI_Workshop::onContextMenuCommand(const QString& theId, bool isChecked)
   }
 }
 
-//**************************************************************
-void XGUI_Workshop::onWidgetValuesChanged()
-{
-  ModuleBase_Operation* anOperation = myOperationMgr->currentOperation();
-  FeaturePtr aFeature = anOperation->feature();
-
-  ModuleBase_ModelWidget* aSenderWidget = dynamic_cast<ModuleBase_ModelWidget*>(sender());
-
-  const QList<ModuleBase_ModelWidget*>& aWidgets = myPropertyPanel->modelWidgets();
-  QList<ModuleBase_ModelWidget*>::const_iterator anIt = aWidgets.begin(), aLast = aWidgets.end();
-  for (; anIt != aLast; anIt++) {
-    ModuleBase_ModelWidget* aCustom = *anIt;
-    if (aCustom && (aCustom == aSenderWidget)) {
-      aCustom->storeValue();
-    }
-  }
-}
-
 //**************************************************************
 void XGUI_Workshop::activatePart(ResultPartPtr theFeature)
 {