]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Fix instability of TestPartition_SolidsHistory.py : duplicates are removed even they...
authormpv <mpv@opencascade.com>
Mon, 4 Mar 2019 11:42:54 +0000 (14:42 +0300)
committermpv <mpv@opencascade.com>
Mon, 4 Mar 2019 11:42:54 +0000 (14:42 +0300)
src/Model/Model_AttributeSelection.cpp

index 92be8663dbc26432cf9469ff69e52055c14d0e7e..f35b7a6e4a168ffde380671ae94610b704e53591 100644 (file)
@@ -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);