X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FModuleBase%2FModuleBase_WidgetFileSelector.cpp;h=dbe8e8ce30411823c8863bd989e56b5b2585101d;hb=752c9e02e6aa8ced24e9b53097cb42540d5e6a08;hp=ee47d10c944c7cdcb58992f9c0617337fbb0b3d3;hpb=3bf561d1ad1773939ae43ffbe0b4c3df03d747e8;p=modules%2Fshaper.git diff --git a/src/ModuleBase/ModuleBase_WidgetFileSelector.cpp b/src/ModuleBase/ModuleBase_WidgetFileSelector.cpp index ee47d10c9..dbe8e8ce3 100644 --- a/src/ModuleBase/ModuleBase_WidgetFileSelector.cpp +++ b/src/ModuleBase/ModuleBase_WidgetFileSelector.cpp @@ -79,7 +79,7 @@ bool ModuleBase_WidgetFileSelector::storeValueCustom() const return true; } -bool ModuleBase_WidgetFileSelector::restoreValue() +bool ModuleBase_WidgetFileSelector::restoreValueCustom() { // A rare case when plugin was not loaded. if (!myFeature) @@ -88,7 +88,9 @@ bool ModuleBase_WidgetFileSelector::restoreValue() AttributeStringPtr aStringAttr = aData->string(attributeID()); bool isBlocked = myPathField->blockSignals(true); - myPathField->setText(QString::fromStdString(aStringAttr->value())); + QString aNewText = QString::fromStdString(aStringAttr->value()); + if( myPathField->text() != aNewText ) + myPathField->setText( aNewText ); myPathField->blockSignals(isBlocked); return true; @@ -162,12 +164,11 @@ QStringList ModuleBase_WidgetFileSelector::getValidatorFormats() const SessionPtr aMgr = ModelAPI_Session::get(); ModelAPI_ValidatorsFactory* aFactory = aMgr->validators(); - std::list allValidators; - std::list > allArguments; - aFactory->validators(myFeature->getKind(), myAttributeID, allValidators, allArguments); + ModelAPI_ValidatorsFactory::Validators allValidators; + aFactory->validators(myFeature->getKind(), myAttributeID, allValidators); QStringList aResult; - std::list anArgumentList = allArguments.front(); + std::list anArgumentList = allValidators.front().second; std::list::const_iterator it = anArgumentList.begin(); for (; it != anArgumentList.end(); ++it) { QString aFormat = QString::fromStdString(*it);