X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FModuleBase%2FModuleBase_ModelWidget.cpp;h=86fe765daafc4e328d73f14677ec27471f799be4;hb=450d1bd65c11870d3942a30164518037b9a7503e;hp=fc7beb3e2760b206dd786e1b333459758bdb28de;hpb=5bb399c88a1cefa30c03754e57b6c684ce733018;p=modules%2Fshaper.git diff --git a/src/ModuleBase/ModuleBase_ModelWidget.cpp b/src/ModuleBase/ModuleBase_ModelWidget.cpp index fc7beb3e2..86fe765da 100644 --- a/src/ModuleBase/ModuleBase_ModelWidget.cpp +++ b/src/ModuleBase/ModuleBase_ModelWidget.cpp @@ -31,6 +31,8 @@ ModuleBase_ModelWidget::ModuleBase_ModelWidget(QWidget* theParent, myState(Stored), myIsValueStateBlocked(false) { + myIsInternal = theData->getBooleanAttribute(ATTR_INTERNAL, false); + myDefaultValue = theData->getProperty(ATTR_DEFAULT); myUseReset = theData->getBooleanAttribute(ATTR_USE_RESET, true); myIsComputedDefault = theData->getProperty(ATTR_DEFAULT) == DOUBLE_WDG_DEFAULT_COMPUTED; @@ -171,7 +173,7 @@ void ModuleBase_ModelWidget::activate() void ModuleBase_ModelWidget::deactivate() { myIsValueStateBlocked = false; - if (myState == ModifiedInPP) + if (myState == ModifiedInPP || myState == ModifiedInViewer) storeValue(); myState = Stored; } @@ -298,8 +300,11 @@ bool ModuleBase_ModelWidget::eventFilter(QObject* theObject, QEvent *theEvent) aReason == Qt::TabFocusReason || aReason == Qt::BacktabFocusReason || aReason == Qt::OtherFocusReason; // to process widget->setFocus() - if (aMouseOrKey && getControls().contains(aWidget) && getValueState() == ModifiedInPP) - storeValue(); + if (aMouseOrKey && getControls().contains(aWidget)) { + if (getValueState() == ModifiedInPP) { + storeValue(); + } + } } // pass the event on to the parent class