From 541e0c0342484090d8ed09ebce253fb96fc19fa3 Mon Sep 17 00:00:00 2001 From: mpv Date: Tue, 28 Aug 2018 09:42:27 +0300 Subject: [PATCH] Correct behavior of the Part remove feature in the test. --- src/ModelAPI/ModelAPI_AttributeSelectionList.h | 2 +- src/PartSetAPI/Test/TestRemoveDuplicate.py | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/ModelAPI/ModelAPI_AttributeSelectionList.h b/src/ModelAPI/ModelAPI_AttributeSelectionList.h index 7070744b6..454d9e34c 100644 --- a/src/ModelAPI/ModelAPI_AttributeSelectionList.h +++ b/src/ModelAPI/ModelAPI_AttributeSelectionList.h @@ -81,7 +81,7 @@ class ModelAPI_AttributeSelectionList : public ModelAPI_Attribute /// Returns the attribute selection by the index (zero based) virtual std::shared_ptr value(const int theIndex) = 0; - /// Returns all attributes + /// Removes all attributes of the list. virtual void clear() = 0; /// Starts or stops cashing of the values in the attribute (the cash may become invalid diff --git a/src/PartSetAPI/Test/TestRemoveDuplicate.py b/src/PartSetAPI/Test/TestRemoveDuplicate.py index da4c94f8b..b66e18113 100644 --- a/src/PartSetAPI/Test/TestRemoveDuplicate.py +++ b/src/PartSetAPI/Test/TestRemoveDuplicate.py @@ -47,6 +47,8 @@ for n in ["Part_1", "Part_3", "Part_2", "Part_4"]: # Remove the middle Part model.removePart(Copy_2) +# move the history line to the end, because remove makes the current feature up +PartSet.setCurrentFeature(Copy_3.feature(), False) model.do() # check the intermediate result @@ -58,6 +60,8 @@ for n in ["Part_1", "Part_2", "Part_4"]: # Remove a first copy model.removePart(Copy_1) +# move the history line to the end, because remove makes the current feature up +PartSet.setCurrentFeature(Copy_3.feature(), False) model.end() # Undo the last remove -- 2.39.2