]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Issue #1648: Dump Python in the High Level Parameterized Geometry API. Shape of selec...
authormpv <mpv@opencascade.com>
Mon, 15 Aug 2016 14:00:41 +0000 (17:00 +0300)
committermpv <mpv@opencascade.com>
Mon, 15 Aug 2016 14:00:41 +0000 (17:00 +0300)
src/ModelHighAPI/ModelHighAPI_Selection.cpp

index 0c4e764f595be68f106cd06e1c1ed8961133a62d..e45f008c08f94b0dfde904998e1dbd23e3f47c51 100644 (file)
@@ -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";