From: nds Date: Fri, 28 Aug 2015 13:51:15 +0000 (+0300) Subject: Issue #811 Be able to export the whole part X-Git-Tag: V_1.4.0_beta4~205 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=a3d1262c156f7ec6c613ebb537e059e3d17bb019;p=modules%2Fshaper.git Issue #811 Be able to export the whole part --- 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); } }