From a3d1262c156f7ec6c613ebb537e059e3d17bb019 Mon Sep 17 00:00:00 2001 From: nds Date: Fri, 28 Aug 2015 16:51:15 +0300 Subject: [PATCH] Issue #811 Be able to export the whole part --- src/ExchangePlugin/plugin-Exchange.xml | 8 +++++--- src/ModuleBase/ModuleBase_WidgetSelector.cpp | 13 ++++++++----- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/src/ExchangePlugin/plugin-Exchange.xml b/src/ExchangePlugin/plugin-Exchange.xml index e98d9f710..adb17dd86 100644 --- a/src/ExchangePlugin/plugin-Exchange.xml +++ b/src/ExchangePlugin/plugin-Exchange.xml @@ -1,9 +1,9 @@ - + - + @@ -12,7 +12,9 @@ - + + + diff --git a/src/ModuleBase/ModuleBase_WidgetSelector.cpp b/src/ModuleBase/ModuleBase_WidgetSelector.cpp index 6f9076bfb..daafd6431 100755 --- a/src/ModuleBase/ModuleBase_WidgetSelector.cpp +++ b/src/ModuleBase/ModuleBase_WidgetSelector.cpp @@ -62,12 +62,18 @@ bool ModuleBase_WidgetSelector::acceptSubShape(const GeomShapePtr& theShape, bool aValid = false; GeomShapePtr aShape = theShape; + + QIntList aShapeTypes = getShapeTypes(); + // when the SHAPE type is provided by XML, the hole result shape can be selected. + if (!aShape.get() && aShapeTypes.contains(TopAbs_SHAPE)) { + aValid = true; + return aValid; + } + if (!aShape.get() && theResult.get()) { if (theResult.get()) aShape = theResult->shape(); } - QIntList aShapeTypes = getShapeTypes(); - TopAbs_ShapeEnum aShapeType = TopAbs_SHAPE; if (aShape.get()) { // Check that the selection corresponds to selection type @@ -76,9 +82,6 @@ bool ModuleBase_WidgetSelector::acceptSubShape(const GeomShapePtr& theShape, // for compounds check sub-shapes: it may be compound of needed type: // Booleans may produce compounds of Solids if (aShapeType == TopAbs_COMPOUND) { - if (aShapeTypes.contains(aShapeType)) - return true; - aShapeType = GeomValidators_Tools::getCompoundSubType(aTopoShape); } } -- 2.39.2