From: vsv Date: Wed, 29 Oct 2014 14:19:38 +0000 (+0300) Subject: Issue #190: Extrusion has to use only results with shape X-Git-Tag: V_0.5~64^2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=45b81a6a0235d944f6324f5eaa591e4740af6eff;p=modules%2Fshaper.git Issue #190: Extrusion has to use only results with shape --- diff --git a/src/ModuleBase/ModuleBase_WidgetShapeSelector.cpp b/src/ModuleBase/ModuleBase_WidgetShapeSelector.cpp index d7518ef60..bd5e54e70 100644 --- a/src/ModuleBase/ModuleBase_WidgetShapeSelector.cpp +++ b/src/ModuleBase/ModuleBase_WidgetShapeSelector.cpp @@ -23,6 +23,7 @@ #include #include #include +#include #include #include @@ -188,9 +189,16 @@ void ModuleBase_WidgetShapeSelector::onSelectionChanged() return; if (mySelectedObject && aObject && mySelectedObject->isSame(aObject)) return; + // Check that the selected object is result (others can not be accepted) + ResultPtr aRes = boost::dynamic_pointer_cast(aObject); + if (!aRes) + return; + // Check that the result has a shape + GeomShapePtr aShape = ModelAPI_Tools::shape(aRes); + if (!aShape) + return; // Get sub-shapes from local selection - boost::shared_ptr aShape; if (myUseSubShapes) { NCollection_List aShapeList; std::list aOwners;