From e7605e088cc2578ec0b9d0df6c962da0619ec21f Mon Sep 17 00:00:00 2001 From: mpv Date: Mon, 19 May 2014 15:02:26 +0400 Subject: [PATCH] Fixed crash on Part creation: it is not in history, but in Parts folder --- src/Model/Model_Document.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/Model/Model_Document.cpp b/src/Model/Model_Document.cpp index be6a5957b..a41e2c7fa 100644 --- a/src/Model/Model_Document.cpp +++ b/src/Model/Model_Document.cpp @@ -316,16 +316,16 @@ void Model_Document::addFeature(const boost::shared_ptr theFea // store feature in the history of features array if (theFeature->isInHistory()) { AddToRefArray(aFeaturesLab, aFeatureLab); - // add featue to the group - const std::string& aGroup = theFeature->getGroup(); - TDF_Label aGroupLab = groupLabel(aGroup); - AddToRefArray(aGroupLab, aFeatureLab); - // new name of this feature object by default equal to name of feature - TDF_Label anObjLab = aGroupLab.NewChild(); - TCollection_ExtendedString aName(theFeature->data()->getName().c_str()); - TDataStd_Name::Set(anObjLab, aName); - AddToRefArray(aGroupLab.FindChild(1), anObjLab); // reference to names is on the first sub } + // add featue to the group + const std::string& aGroup = theFeature->getGroup(); + TDF_Label aGroupLab = groupLabel(aGroup); + AddToRefArray(aGroupLab, aFeatureLab); + // new name of this feature object by default equal to name of feature + TDF_Label anObjLab = aGroupLab.NewChild(); + TCollection_ExtendedString aName(theFeature->data()->getName().c_str()); + TDataStd_Name::Set(anObjLab, aName); + AddToRefArray(aGroupLab.FindChild(1), anObjLab); // reference to names is on the first sub // event: feature is added static Events_ID anEvent = Events_Loop::eventByName(EVENT_FEATURE_CREATED); -- 2.39.2