From d5e88bbc00dad27b516d42944e3936a6b08ead77 Mon Sep 17 00:00:00 2001 From: dbv Date: Tue, 16 Feb 2016 12:41:40 +0300 Subject: [PATCH] Does not make compound if only one shape exported. --- src/ExchangePlugin/ExchangePlugin_ExportFeature.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/ExchangePlugin/ExchangePlugin_ExportFeature.cpp b/src/ExchangePlugin/ExchangePlugin_ExportFeature.cpp index a399b646e..f4ff3d3ad 100644 --- a/src/ExchangePlugin/ExchangePlugin_ExportFeature.cpp +++ b/src/ExchangePlugin/ExchangePlugin_ExportFeature.cpp @@ -90,8 +90,14 @@ void ExchangePlugin_ExportFeature::execute() if (aCurShape.get() != NULL) aShapes.push_back(aCurShape); } - std::shared_ptr aShape = - GeomAlgoAPI_CompoundBuilder::compound(aShapes); + + // Store compound if we have more than one shape. + std::shared_ptr aShape; + if(aShapes.size() == 1) { + aShape = aShapes.front(); + } else { + aShape = GeomAlgoAPI_CompoundBuilder::compound(aShapes); + } exportFile(aFilePath, aFormat, aShape); } -- 2.39.2