From: mpv Date: Thu, 21 May 2015 14:59:26 +0000 (+0300) Subject: Make sketch edges appeared on sketch edit X-Git-Tag: V_1.2.0~122 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=b30b4117723eb045325e533298dd5902c9a47f8d;p=modules%2Fshaper.git Make sketch edges appeared on sketch edit --- diff --git a/src/Model/Model_Document.cpp b/src/Model/Model_Document.cpp index 82ae16d65..985c401ae 100644 --- a/src/Model/Model_Document.cpp +++ b/src/Model/Model_Document.cpp @@ -669,15 +669,18 @@ void Model_Document::setCurrentFeature(std::shared_ptr theCurr } } }*/ - // if feature nests into compisite feature, make the composite feature as current - const std::set& aRefsToMe = theCurrent->data()->refsToMe(); - std::set::const_iterator aRefToMe = aRefsToMe.begin(); - for(; aRefToMe != aRefsToMe.end(); aRefToMe++) { - CompositeFeaturePtr aComposite = - std::dynamic_pointer_cast((*aRefToMe)->owner()); - if (aComposite.get() && aComposite->isSub(theCurrent)) { - aMain = aComposite; - break; + aMain = std::dynamic_pointer_cast(theCurrent); + if (!aMain.get()) { + // if feature nests into compisite feature, make the composite feature as current + const std::set& aRefsToMe = theCurrent->data()->refsToMe(); + std::set::const_iterator aRefToMe = aRefsToMe.begin(); + for(; aRefToMe != aRefsToMe.end(); aRefToMe++) { + CompositeFeaturePtr aComposite = + std::dynamic_pointer_cast((*aRefToMe)->owner()); + if (aComposite.get() && aComposite->isSub(theCurrent)) { + aMain = aComposite; + break; + } } }