From: mpv Date: Mon, 15 Aug 2016 14:00:41 +0000 (+0300) Subject: Issue #1648: Dump Python in the High Level Parameterized Geometry API. Shape of selec... X-Git-Tag: V_2.5.0~137^2~51 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=4236eba0cb691aab17147d96f5ac5fa1a73d619f;p=modules%2Fshaper.git Issue #1648: Dump Python in the High Level Parameterized Geometry API. Shape of selection may be empty (if the whole context is selected). --- diff --git a/src/ModelHighAPI/ModelHighAPI_Selection.cpp b/src/ModelHighAPI/ModelHighAPI_Selection.cpp index 0c4e764f5..e45f008c0 100644 --- a/src/ModelHighAPI/ModelHighAPI_Selection.cpp +++ b/src/ModelHighAPI/ModelHighAPI_Selection.cpp @@ -82,8 +82,10 @@ TypeSubShapeNamePair ModelHighAPI_Selection::typeSubShapeNamePair() const std::string ModelHighAPI_Selection::shapeType() const { switch(myVariantType) { - case VT_ResultSubShapePair: return myResultSubShapePair.second->shapeTypeStr(); - case VT_TypeSubShapeNamePair: return myTypeSubShapeNamePair.first; + case VT_ResultSubShapePair: + return myResultSubShapePair.second.get() ? myResultSubShapePair.second->shapeTypeStr() : + myResultSubShapePair.first->shape()->shapeTypeStr(); + case VT_TypeSubShapeNamePair: return myTypeSubShapeNamePair.first; } return "SHAPE";