#include <string>
ModuleBase_WidgetFileSelector::ModuleBase_WidgetFileSelector(QWidget* theParent,
- const Config_WidgetAPI* theData,
- const std::string& theParentId)
- : ModuleBase_ModelWidget(theParent, theData, theParentId)
+ const Config_WidgetAPI* theData)
+: ModuleBase_ModelWidget(theParent, theData)
{
myTitle = QString::fromStdString(theData->getProperty("title"));
myType = (theData->getProperty("type") == "save") ? WFS_SAVE : WFS_OPEN;
{
}
-bool ModuleBase_WidgetFileSelector::storeValueCustom() const
+bool ModuleBase_WidgetFileSelector::storeValueCustom()
{
// A rare case when plugin was not loaded.
if (!myFeature)
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;
if (myType == WFS_SAVE)
aFileName = applyExtension(aFileName, mySelectedFilter);
myPathField->setText(aFileName);
+ emit focusOutWidget(this);
}
}