From 9b0703c45ab066f8421c72865b1b701f5c169860 Mon Sep 17 00:00:00 2001 From: mpv Date: Tue, 12 May 2015 11:13:56 +0300 Subject: [PATCH] Fix of crash on feature in new part creation --- src/Model/Model_Document.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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()) { -- 2.39.2