const Config_WidgetAPI* theData)
: ModuleBase_ModelWidget(theParent, theData)
{
- myTitle = QString::fromStdString(theData->getProperty("title"));
+ myTitle = translate(theData->getProperty("title"));
myType = (theData->getProperty("type") == "save") ? WFS_SAVE : WFS_OPEN;
myDefaultPath = QString::fromStdString(theData->getProperty("path"));
{
}
-bool ModuleBase_WidgetFileSelector::storeValueCustom() const
+bool ModuleBase_WidgetFileSelector::storeValueCustom()
{
- // A rare case when plugin was not loaded.
+ // A rare case when plugin was not loaded.
if (!myFeature)
return false;
DataPtr aData = myFeature->data();
bool ModuleBase_WidgetFileSelector::restoreValueCustom()
{
- // A rare case when plugin was not loaded.
+ // A rare case when plugin was not loaded.
if (!myFeature)
return false;
DataPtr aData = myFeature->data();
if (myType == WFS_SAVE)
aFileName = applyExtension(aFileName, mySelectedFilter);
myPathField->setText(aFileName);
+ emit focusOutWidget(this);
}
}