]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Fix of crash on feature in new part creation CurrentFeature_Bug
authormpv <mpv@opencascade.com>
Tue, 12 May 2015 08:13:56 +0000 (11:13 +0300)
committermpv <mpv@opencascade.com>
Tue, 12 May 2015 08:13:56 +0000 (11:13 +0300)
src/Model/Model_Document.cpp

index 06786c9b64450db17d01d51f60f80bfc18053719..238b0f3e624669cd1a21872bb1a4e8b26754b31e 100644 (file)
@@ -966,7 +966,7 @@ int Model_Document::size(const std::string& theGroupID, const bool theHidden)
 
 std::shared_ptr<ModelAPI_Feature> 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<ModelAPI_Feature> Model_Document::currentFeature()
 
 void Model_Document::setCurrentFeature(std::shared_ptr<ModelAPI_Feature> theCurrent)
 {
-  static TDF_Label aRefLab = generalLabel().FindChild(TAG_CURRENT_FEATURE);
+  TDF_Label aRefLab = generalLabel().FindChild(TAG_CURRENT_FEATURE);
   if (theCurrent.get()) {
     std::shared_ptr<Model_Data> aData = std::static_pointer_cast<Model_Data>(theCurrent->data());
     if (aData.get()) {