- std::set<ObjectPtr> aModifiedObjects;
-
- // set error state for new objects and append them in the internal map of objects
- std::set<ObjectPtr>::const_iterator
- anIt = theConflictingObjects.begin(), aLast = theConflictingObjects.end();
- for (; anIt != aLast; anIt++) {
- ObjectPtr anObject = *anIt;
- if (myConflictingObjects.find(anObject) == myConflictingObjects.end()) { // it is not found
- aModifiedObjects.insert(anObject);
- myConflictingObjects.insert(anObject);
+ bool isAllowToChange = ModuleBase_Preferences::resourceMgr()->booleanValue(SKETCH_TAB_NAME,
+ "allow_change_constraint");
+ if (isAllowToChange) {
+ std::set<ObjectPtr> aModifiedObjects;
+
+ // set error state for new objects and append them in the internal map of objects
+ std::set<ObjectPtr>::const_iterator
+ anIt = theConflictingObjects.begin(), aLast = theConflictingObjects.end();
+
+ int aCountOfSimilarConstraints = 0;
+ for (; anIt != aLast; anIt++) {
+ ObjectPtr anObject = *anIt;
+ if (myConflictingObjects.find(anObject) == myConflictingObjects.end()) { // it is not found
+ aModifiedObjects.insert(anObject);
+ myConflictingObjects.insert(anObject);
+ }
+ else
+ ++aCountOfSimilarConstraints;