Fix Debug Assert in CmdPartDesignDuplicateSelection::activated

Under Windows, "Edit/Duplicate selected object" raised a
Debug Assertion Failed "Expression: sequence not ordered".
This commit is contained in:
Danny Lepage 2015-06-23 19:58:29 -04:00 committed by Stefan Tröger
parent 63bdbe5561
commit 8aecb00a8d

View File

@ -294,6 +294,8 @@ void CmdPartDesignDuplicateSelection::activated(int iMsg)
// Find the features that were added
std::vector<App::DocumentObject*> afterFeatures = getDocument()->getObjects();
std::vector<App::DocumentObject*> 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));