From: mpv Date: Tue, 12 May 2015 08:13:56 +0000 (+0300) Subject: Fix of crash on feature in new part creation X-Git-Tag: V_1.2.0~160 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=9b0703c45ab066f8421c72865b1b701f5c169860;p=modules%2Fshaper.git Fix of crash on feature in new part creation --- diff --git a/src/Model/Model_Document.cpp b/src/Model/Model_Document.cpp index 06786c9b6..238b0f3e6 100644 --- a/src/Model/Model_Document.cpp +++ b/src/Model/Model_Document.cpp @@ -966,7 +966,7 @@ int Model_Document::size(const std::string& theGroupID, const bool theHidden) std::shared_ptr Model_Document::currentFeature() { - static TDF_Label aRefLab = generalLabel().FindChild(TAG_CURRENT_FEATURE); + TDF_Label aRefLab = generalLabel().FindChild(TAG_CURRENT_FEATURE); Handle(TDF_Reference) aRef; if (aRefLab.FindAttribute(TDF_Reference::GetID(), aRef)) { TDF_Label aLab = aRef->Get(); @@ -977,7 +977,7 @@ std::shared_ptr Model_Document::currentFeature() void Model_Document::setCurrentFeature(std::shared_ptr theCurrent) { - static TDF_Label aRefLab = generalLabel().FindChild(TAG_CURRENT_FEATURE); + TDF_Label aRefLab = generalLabel().FindChild(TAG_CURRENT_FEATURE); if (theCurrent.get()) { std::shared_ptr aData = std::static_pointer_cast(theCurrent->data()); if (aData.get()) {