From: mpv Date: Wed, 17 Dec 2014 13:26:55 +0000 (+0300) Subject: Fix of crash on undo/redo/undo of extrusion: the comment of sketch result was erased... X-Git-Tag: before_slalome_7.5.1~1 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;ds=inline;h=53f6beb5ed80b108cbfc5a8aca6b2bea370458d3;p=modules%2Fshaper.git Fix of crash on undo/redo/undo of extrusion: the comment of sketch result was erased by extrusion reference --- diff --git a/src/Model/Model_AttributeReference.cpp b/src/Model/Model_AttributeReference.cpp index b2f27073d..2b0e15756 100644 --- a/src/Model/Model_AttributeReference.cpp +++ b/src/Model/Model_AttributeReference.cpp @@ -32,8 +32,8 @@ void Model_AttributeReference::setValue(ObjectPtr theObject) std::dynamic_pointer_cast(owner()->document()); myRef->Set(anObjLab); // references to the object label // remove external link attributes (if any) - anObjLab.ForgetAttribute(TDataStd_Comment::GetID()); - anObjLab.ForgetAttribute(TDataStd_AsciiString::GetID()); + myRef->Label().ForgetAttribute(TDataStd_Comment::GetID()); + myRef->Label().ForgetAttribute(TDataStd_AsciiString::GetID()); } else { // different document: store the document name (comment) and entry (string): external // if these attributes exist, the link is external: keep reference to access the label TDataStd_Comment::Set(myRef->Label(), theObject->document()->id().c_str()); diff --git a/src/Model/Model_Document.cpp b/src/Model/Model_Document.cpp index 557ee00e5..389bbfb4b 100644 --- a/src/Model/Model_Document.cpp +++ b/src/Model/Model_Document.cpp @@ -50,6 +50,11 @@ static const int TAG_HISTORY = 3; // tag of the history sub-tree (python dump) static const int TAG_FEATURE_ARGUMENTS = 1; ///< where the arguments are located static const int TAG_FEATURE_RESULTS = 2; ///< where the results are located +/// +/// 0:1:2 - where features are located +/// 0:1:2:N:1 - data of the feature N +/// 0:1:2:N:2:K:1 - data of the K result of the feature N + Model_Document::Model_Document(const std::string theID, const std::string theKind) : myID(theID), myKind(theKind), myDoc(new TDocStd_Document("BinOcaf")) // binary OCAF format