From fa96e988fcff7caf36ead00e027021fda402fdc3 Mon Sep 17 00:00:00 2001 From: mpv Date: Wed, 7 Sep 2016 16:56:42 +0300 Subject: [PATCH] Fix for the dump to python for model from the issue #1739 --- src/Model/Model_SelectionNaming.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/Model/Model_SelectionNaming.cpp b/src/Model/Model_SelectionNaming.cpp index 3b2cfba31..567d4a867 100644 --- a/src/Model/Model_SelectionNaming.cpp +++ b/src/Model/Model_SelectionNaming.cpp @@ -75,8 +75,13 @@ std::string Model_SelectionNaming::getShapeName( int aDepth = anObjL.Depth(); if (aDepth == 5 || aDepth == 7) { ObjectPtr anObj = theDoc->objects()->object(anObjL); - if (anObj) { - aName = anObj->data()->name() + "/" + aName; + if (anObj.get()) { + ResultPtr aRes = std::dynamic_pointer_cast(anObj); + if (aRes.get()) { + if (aRes && !aRes->shape()->impl().IsEqual(theShape)) { + aName = anObj->data()->name() + "/" + aName; + } + } } } } -- 2.39.2