if (aColor.empty())
XGUI_CustomPrs::getDefaultColor(anObject, true, aColor);
if (!aColor.empty()) {
- thePrs->setColor(aColor[0], aColor[1], aColor[2]);
- aCustomized = true;
+ aCustomized = thePrs->setColor(aColor[0], aColor[1], aColor[2]);
}
}
}
break;
case PartSet_Tools::Expressions: {
- /// call all sketch features redisplay, the expression state will be corrected in customize
- /// of distance presentation
- Events_ID anEventId = Events_Loop::loop()->eventByName(EVENT_OBJECT_TO_REDISPLAY);
- PartSet_Tools::sendSubFeaturesEvent(myCurrentSketch, anEventId);
+ if (aPrevState != theState) {
+ /// call all sketch features redisplay, the expression state will be corrected in customize
+ /// of distance presentation
+ Events_ID anEventId = Events_Loop::loop()->eventByName(EVENT_OBJECT_TO_REDISPLAY);
+ PartSet_Tools::sendSubFeaturesEvent(myCurrentSketch, anEventId);
+ }
}
break;
}