- // the error message should be changed before sending the message
- sendMessage(EVENT_SOLVER_FAILED, aConflicting);
+ if (myConflictingConstraints.empty())
+ sendMessage(EVENT_SOLVER_FAILED, aConflicting);
+ else {
+ std::set<ObjectPtr>::iterator anIt = aConflicting.begin();
+ for (; anIt != aConflicting.end(); ++anIt)
+ myConflictingConstraints.erase(*anIt);
+ if (!myConflictingConstraints.empty()) {
+ // some constraints does not conflict, send corresponding message
+ sendMessage(EVENT_SOLVER_REPAIRED, myConflictingConstraints);
+ }
+ }
+ myConflictingConstraints = aConflicting;