X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FPartSet%2FPartSet_WidgetFileSelector.cpp;h=b493c2a86fd569d8a18866885b085df023a91c4e;hb=56c3f4abe8b191d5255880ac2efe79558e6ed187;hp=4f4f9531d037cc52ed548532262fd76fafc80d4f;hpb=3bf561d1ad1773939ae43ffbe0b4c3df03d747e8;p=modules%2Fshaper.git diff --git a/src/PartSet/PartSet_WidgetFileSelector.cpp b/src/PartSet/PartSet_WidgetFileSelector.cpp index 4f4f9531d..b493c2a86 100644 --- a/src/PartSet/PartSet_WidgetFileSelector.cpp +++ b/src/PartSet/PartSet_WidgetFileSelector.cpp @@ -11,26 +11,27 @@ #include +#include + PartSet_WidgetFileSelector::PartSet_WidgetFileSelector(QWidget* theParent, ModuleBase_IWorkshop* theWorkshop, - const Config_WidgetAPI* theData, - const std::string& theParentId) -: ModuleBase_WidgetFileSelector(theParent, theData, theParentId) -, myWorkshop(theWorkshop) + const Config_WidgetAPI* theData) +: ModuleBase_WidgetFileSelector(theParent, theData), + myWorkshop(theWorkshop) { } -bool PartSet_WidgetFileSelector::restoreValue() +bool PartSet_WidgetFileSelector::restoreValueCustom() { // A rare case when plugin was not loaded. if (!myFeature) return false; DataPtr aData = myFeature->data(); - AttributeStringPtr aStringAttr = aData->string("export_file_format"); + AttributeStringPtr aStringAttr = aData->string(ExchangePlugin_ExportFeature::FILE_PATH_ID()); mySelectedFilter = formatToFilter(shortFormatToFullFormat(QString::fromStdString(aStringAttr->value()))); - return ModuleBase_WidgetFileSelector::restoreValue(); + return ModuleBase_WidgetFileSelector::restoreValueCustom(); } bool PartSet_WidgetFileSelector::storeValueCustom() const @@ -40,7 +41,7 @@ bool PartSet_WidgetFileSelector::storeValueCustom() const return false; DataPtr aData = myFeature->data(); - AttributeStringPtr aStringAttr = aData->string("export_file_format"); + AttributeStringPtr aStringAttr = aData->string(ExchangePlugin_ExportFeature::FILE_FORMAT_ID()); aStringAttr->setValue(filterToShortFormat(mySelectedFilter).toStdString()); return ModuleBase_WidgetFileSelector::storeValueCustom();