X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2FModuleBase%2FModuleBase_Operation.cpp;h=58891e564d2bb1c9bec7a299fcdf7b7c3b2c1c52;hb=9ddba1caf0817c1e95c55d4c5b8ae6de23cbe6d5;hp=7484ff28dd7e5798e57643126dd19de9eaffc644;hpb=729ea3c3b62c68de5bb84ebd972a03b8ff069790;p=modules%2Fshaper.git diff --git a/src/ModuleBase/ModuleBase_Operation.cpp b/src/ModuleBase/ModuleBase_Operation.cpp index 7484ff28d..58891e564 100644 --- a/src/ModuleBase/ModuleBase_Operation.cpp +++ b/src/ModuleBase/ModuleBase_Operation.cpp @@ -136,6 +136,7 @@ bool ModuleBase_Operation::hasObject(ObjectPtr theObj) const void ModuleBase_Operation::start() { + myIsModified = false; QString anId = getDescription()->operationId(); if (myIsEditing) { anId = anId.append(EditSuffix()); @@ -255,6 +256,11 @@ void ModuleBase_Operation::setRunning(bool theState) emit triggered(theState); } +void ModuleBase_Operation::onValuesChanged() +{ + myIsModified = true; +} + //TODO: nds stabilization hotfix void ModuleBase_Operation::commitOperation() { @@ -375,6 +381,15 @@ void ModuleBase_Operation::setPropertyPanel(ModuleBase_IPropertyPanel* theProp) myPropertyPanel = theProp; myPropertyPanel->setEditingMode(isEditOperation()); + if (myPropertyPanel) { + const QList& aWidgets = myPropertyPanel->modelWidgets(); + QList::const_iterator aWIt; + for (aWIt = aWidgets.constBegin(); aWIt != aWidgets.constEnd(); ++aWIt) { + ModuleBase_ModelWidget* aWgt = (*aWIt); + connect(aWgt, SIGNAL(valuesChanged()), this, SLOT(onValuesChanged())); + } + } + // Do not activate widgets by default if the current operation is editing operation // Because we don't know which widget is going to be edited. if (!isEditOperation())