From f06c34c43ff749657378cef06cc12d1ce2acc04e Mon Sep 17 00:00:00 2001 From: mpv Date: Mon, 4 Mar 2019 14:42:54 +0300 Subject: [PATCH] Fix instability of TestPartition_SolidsHistory.py : duplicates are removed even they are first in the updateInHistory results. --- src/Model/Model_AttributeSelection.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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); -- 2.39.2