Salome HOME
Issue #1648: Dump Python in the High Level Parameterized Geometry API
[modules/shaper.git] / src / ModuleBase / ModuleBase_Operation.cpp
index 009502dcb6f525c7076369ec593aff5780cfed70..af08c48fd0d23ab1fe601447a8c084a49e278dd5 100644 (file)
@@ -60,16 +60,6 @@ void ModuleBase_Operation::setGrantedOperationIds(const QStringList& theList)
   myGrantedIds = theList;
 }
 
-void ModuleBase_Operation::addGrantedOperationId(const QString& theId)
-{
-  myGrantedIds.append(theId);
-}
-
-void ModuleBase_Operation::removeGrantedOperationId(const QString& theId)
-{
-  myGrantedIds.removeAll(theId);
-}
-
 QString ModuleBase_Operation::id() const
 {
   return getDescription()->operationId();
@@ -85,7 +75,7 @@ bool ModuleBase_Operation::canBeCommitted() const
   return isValid();
 }
 
-void ModuleBase_Operation::start()
+bool ModuleBase_Operation::start()
 {
   myIsModified = false;
 
@@ -93,6 +83,8 @@ void ModuleBase_Operation::start()
 
   startOperation();
   emit started();
+
+  return true;
 }
 
 void ModuleBase_Operation::postpone()
@@ -150,6 +142,17 @@ void ModuleBase_Operation::onValuesChanged()
   myIsModified = true;
 }
 
+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;