Salome HOME
Bugfix: treat attribute as valid and initialized if it's default value is equual...
[modules/shaper.git] / src / ModuleBase / ModuleBase_WidgetFileSelector.cpp
index 7d834cca412be1c0266670bb609ece6bfc20d9a5..a2e8186c8f2e85797ae3468b11507ab77f803405 100644 (file)
@@ -29,8 +29,6 @@ ModuleBase_WidgetFileSelector::ModuleBase_WidgetFileSelector(QWidget* theParent,
                                                              const std::string& theParentId)
     : ModuleBase_ModelWidget(theParent, theData, theParentId)
 {
-  myHasDefaultValue = false;
-
   myTitle = QString::fromStdString(theData->getProperty("title"));
   //TODO(sbh): Get them from the feature
   myFormats = getSupportedFormats(theData);
@@ -67,12 +65,9 @@ bool ModuleBase_WidgetFileSelector::storeValue() const
 {
   DataPtr aData = myFeature->data();
   AttributeStringPtr aStringAttr = aData->string(attributeID());
-  QString aModelValue = QString::fromStdString(aStringAttr->value());
   QString aWidgetValue = myPathField->text();
-  if(aModelValue != aWidgetValue) {
-    aStringAttr->setValue(aWidgetValue.toStdString());
-    updateObject(myFeature);
-  }
+  aStringAttr->setValue(aWidgetValue.toStdString());
+  updateObject(myFeature);
   return true;
 }