Salome HOME
Origin selection as Rotation center of Sketch Rotation feature.
[modules/shaper.git] / src / ModuleBase / ModuleBase_Operation.cpp
index 66b0a51aaea3e7bba7235649affbb0df5912f54d..853d9fc5fd6503ac65c83b7d8cd0fa8204ad9984 100644 (file)
@@ -75,7 +75,7 @@ bool ModuleBase_Operation::canBeCommitted() const
   return isValid();
 }
 
-void ModuleBase_Operation::start()
+bool ModuleBase_Operation::start()
 {
   myIsModified = false;
 
@@ -83,6 +83,8 @@ void ModuleBase_Operation::start()
 
   startOperation();
   emit started();
+
+  return true;
 }
 
 void ModuleBase_Operation::postpone()
@@ -140,9 +142,20 @@ void ModuleBase_Operation::onValuesChanged()
   myIsModified = true;
 }
 
-void ModuleBase_Operation::setPropertyPanel(ModuleBase_IPropertyPanel* theProp) 
-{ 
-  myPropertyPanel = theProp; 
+void ModuleBase_Operation::onValueStateChanged(int thePreviousState)
+{
+  if (propertyPanel()) {
+    ModuleBase_ModelWidget* aWidget = propertyPanel()->activeWidget();
+    if (aWidget) {
+      if (aWidget->getValueState() == ModuleBase_ModelWidget::ModifiedInPP)
+        myIsModified = true;
+    }
+  }
+}
+
+void ModuleBase_Operation::setPropertyPanel(ModuleBase_IPropertyPanel* theProp)
+{
+  myPropertyPanel = theProp;
 }
 
 bool ModuleBase_Operation::isGranted(QString theId) const