From: mpv Date: Fri, 7 Dec 2018 16:40:14 +0000 (+0300) Subject: Fix for the tests SketchPlugin_TestMirror and SketchPlugin_TestMultiRotation in RefLi... X-Git-Tag: End2018~101 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=a93d9fa2d5fa8dc056f60820a6801a0652da4847;p=modules%2Fshaper.git Fix for the tests SketchPlugin_TestMirror and SketchPlugin_TestMultiRotation in RefList Hash usage --- diff --git a/src/Model/Model_AttributeRefList.cpp b/src/Model/Model_AttributeRefList.cpp index 4c152b929..e8a17a734 100644 --- a/src/Model/Model_AttributeRefList.cpp +++ b/src/Model/Model_AttributeRefList.cpp @@ -124,7 +124,6 @@ void Model_AttributeRefList::remove(ObjectPtr theObject) void Model_AttributeRefList::clear() { - eraseHash(); std::list anOldList = list(); myRef->Clear(); std::list::iterator anOldIter = anOldList.begin(); @@ -132,6 +131,7 @@ void Model_AttributeRefList::clear() REMOVE_BACK_REF((*anOldIter)); } myExtDocRef->Clear(); + eraseHash(); owner()->data()->sendAttributeUpdated(this); } @@ -318,8 +318,8 @@ void Model_AttributeRefList::remove(const std::set& theIndices) REMOVE_BACK_REF(anObj); } } - eraseHash(); if (!aLabelsToRemove.IsEmpty()) { + eraseHash(); owner()->data()->sendAttributeUpdated(this); } } @@ -347,6 +347,7 @@ void Model_AttributeRefList::createHash() { if (myHashUsed) return; + eraseHash(); std::shared_ptr aDoc = std::dynamic_pointer_cast( owner()->document()); if (aDoc) {