Sketcher: skip the latest added one of the detected redundant constraints

This commit is contained in:
logari81 2012-05-25 18:04:29 +02:00
parent 50bbf527dd
commit b7965052a3

View File

@ -1397,7 +1397,9 @@ int System::diagnose()
Constraint *mostPopular = NULL;
for (std::map< Constraint *, SET_I >::const_iterator it=conflictingMap.begin();
it != conflictingMap.end(); it++) {
if (it->second.size() >= maxPopularity) {
if (it->second.size() > maxPopularity ||
(it->second.size() == maxPopularity && mostPopular &&
it->first->getTag() > mostPopular->getTag())) {
mostPopular = it->first;
maxPopularity = it->second.size();
}