X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2FModuleBase%2FModuleBase_Operation.cpp;h=853d9fc5fd6503ac65c83b7d8cd0fa8204ad9984;hb=3e6012473696e5fd94e3c8240e2e1eda8def1743;hp=009502dcb6f525c7076369ec593aff5780cfed70;hpb=f0f8fbdcadad2d5d42c443e70afc6251faea1469;p=modules%2Fshaper.git diff --git a/src/ModuleBase/ModuleBase_Operation.cpp b/src/ModuleBase/ModuleBase_Operation.cpp index 009502dcb..853d9fc5f 100644 --- a/src/ModuleBase/ModuleBase_Operation.cpp +++ b/src/ModuleBase/ModuleBase_Operation.cpp @@ -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,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