const int theValue,
bool sendUpdated)
{
- if (myArray->Value(theIndex) != theValue) {
+ if (!isInitialized() || myArray->Value(theIndex) != theValue) {
setInitialized();
myArray->SetValue(theIndex, theValue);
if (sendUpdated)
FeaturePtr aFeature = std::dynamic_pointer_cast<ModelAPI_Feature>(theAttribute->owner());
AttributeRefListPtr aSelAttr =
std::dynamic_pointer_cast<ModelAPI_AttributeRefList>(theAttribute);
+ std::set<ObjectPtr> aSelected;
AttributeRefListPtr aRefListOfInitial = std::dynamic_pointer_cast<ModelAPI_AttributeRefList>(
aFeature->attribute(SketchPlugin_Constraint::ENTITY_A()));
std::list<ObjectPtr>::iterator anObjIter;
for(int anInd = 0; anInd < aSelAttr->size(); anInd++) {
ObjectPtr aSelObject = aSelAttr->object(anInd);
+ if (aSelected.find(aSelObject) != aSelected.end()) {
+ theError = "Error: An object selected twice";
+ return false;
+ }
+ aSelected.insert(aSelObject);
+
anObjIter = anInitialObjects.begin();
for (; anObjIter != anInitialObjects.end(); anObjIter++)
if (aSelObject == *anObjIter)