]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Export feature crash correction.
authornds <nds@opencascade.com>
Fri, 21 Aug 2015 17:00:33 +0000 (20:00 +0300)
committernds <nds@opencascade.com>
Fri, 21 Aug 2015 17:00:33 +0000 (20:00 +0300)
src/PartSet/CMakeLists.txt
src/PartSet/PartSet_WidgetFileSelector.cpp

index 4bc8ebfcd35e5d660cfd1db301bb1b9b18e75f59..388a735fbd97e80240f1ed838c3f5b41c2795922 100644 (file)
@@ -107,6 +107,7 @@ INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/src/XGUI
                     ${CMAKE_SOURCE_DIR}/src/GeomDataAPI
                     ${CMAKE_SOURCE_DIR}/src/GeomAlgoAPI
                     ${CMAKE_SOURCE_DIR}/src/SketchPlugin
+                    ${CMAKE_SOURCE_DIR}/src/ExchangePlugin
                     ${CMAKE_SOURCE_DIR}/src/SketcherPrs
                     ${CMAKE_SOURCE_DIR}/src/FeaturesPlugin
                     ${CMAKE_SOURCE_DIR}/src/PartSetPlugin
index 117a8c866fcda85762ecff8fbca710757e5f16b6..06200820770609e1f2b58a7f9ad069ead046f748 100644 (file)
@@ -11,6 +11,8 @@
 
 #include <ModelAPI_AttributeString.h>
 
+#include <ExchangePlugin_ExportFeature.h>
+
 PartSet_WidgetFileSelector::PartSet_WidgetFileSelector(QWidget* theParent,
                                                        ModuleBase_IWorkshop* theWorkshop,
                                                        const Config_WidgetAPI* theData,
@@ -27,7 +29,7 @@ bool PartSet_WidgetFileSelector::restoreValueCustom()
     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::restoreValueCustom();
@@ -40,7 +42,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_PATH_ID());
   aStringAttr->setValue(filterToShortFormat(mySelectedFilter).toStdString());
 
   return ModuleBase_WidgetFileSelector::storeValueCustom();