diff --git a/src/Mod/PartDesign/Gui/Command.cpp b/src/Mod/PartDesign/Gui/Command.cpp index e089bd5d2..377895e59 100644 --- a/src/Mod/PartDesign/Gui/Command.cpp +++ b/src/Mod/PartDesign/Gui/Command.cpp @@ -294,6 +294,8 @@ void CmdPartDesignDuplicateSelection::activated(int iMsg) // Find the features that were added std::vector afterFeatures = getDocument()->getObjects(); std::vector newFeatures; + std::sort(beforeFeatures.begin(), beforeFeatures.end()); + std::sort(afterFeatures.begin(), afterFeatures.end()); std::set_difference(afterFeatures.begin(), afterFeatures.end(), beforeFeatures.begin(), beforeFeatures.end(), std::back_inserter(newFeatures));