From: mpv Date: Mon, 4 Mar 2019 11:42:54 +0000 (+0300) Subject: Fix instability of TestPartition_SolidsHistory.py : duplicates are removed even they... X-Git-Tag: V9_3_0a2~7 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=f06c34c43ff749657378cef06cc12d1ce2acc04e;p=modules%2Fshaper.git Fix instability of TestPartition_SolidsHistory.py : duplicates are removed even they are first in the updateInHistory results. --- diff --git a/src/Model/Model_AttributeSelection.cpp b/src/Model/Model_AttributeSelection.cpp index 92be8663d..f35b7a6e4 100644 --- a/src/Model/Model_AttributeSelection.cpp +++ b/src/Model/Model_AttributeSelection.cpp @@ -1504,8 +1504,10 @@ void Model_AttributeSelection::updateInHistory(bool& theRemove) } if (aFirst) { - setValue(*aNewCont, aValueShape); - aFirst = false; + if (!myParent || !myParent->isInList(*aNewCont, aValueShape)) { // avoid duplicates + setValue(*aNewCont, aValueShape); + aFirst = false; + } } else if (myParent) { if (!myParent->isInList(*aNewCont, aValueShape)) // avoid addition of duplicates myParent->append(*aNewCont, aValueShape);