Salome HOME
Delete key regression corrections: in previous implementation sketch entities did...
[modules/shaper.git] / src / ExchangePlugin / ExchangePlugin_ExportFeature.cpp
index f43c7c73387214a65e6ace8899bbd37d2c9b291d..a399b646ee9ac6108fad65f45bfc9896a973ec7e 100644 (file)
@@ -83,7 +83,12 @@ void ExchangePlugin_ExportFeature::execute()
       this->selectionList(ExchangePlugin_ExportFeature::SELECTION_LIST_ID());
   std::list<std::shared_ptr<GeomAPI_Shape> > aShapes;
   for (int i = 0, aSize = aSelectionListAttr->size(); i < aSize; ++i) {
-    aShapes.push_back(aSelectionListAttr->value(i)->value());
+    AttributeSelectionPtr anAttrSelection = aSelectionListAttr->value(i);
+    std::shared_ptr<GeomAPI_Shape> aCurShape = anAttrSelection->value();
+    if (aCurShape.get() == NULL)
+      aCurShape = anAttrSelection->context()->shape();
+    if (aCurShape.get() != NULL)
+      aShapes.push_back(aCurShape);
   }
   std::shared_ptr<GeomAPI_Shape> aShape =
       GeomAlgoAPI_CompoundBuilder::compound(aShapes);