static const Events_ID kOpStartEvent = aLoop->eventByName("StartOperation");
bool isAutomaticChanged = false;
if (theMessage->eventID() == kChangedEvent) { // automatic and manual rebuild flag is changed
- isAutomatic =
- Config_PropManager::findProp("Model update", "automatic_rebuild")->value() == "true";
+ bool aPropVal =
+ Config_PropManager::findProp("Model update", "automatic_rebuild")->value() == "true";
+ if (aPropVal == isAutomatic)
+ return;// nothing to
+ isAutomatic = aPropVal;
} else if (theMessage->eventID() == kRebuildEvent) { // the rebuild command
if (isAutomatic == false) {
isAutomaticChanged = true;
std::shared_ptr<ModelAPI_AttributeSelection> aSel =
std::dynamic_pointer_cast<ModelAPI_AttributeSelection>(*aRefsIter);
if (!aSel->update()) { // this must be done on execution since it may be long operation
- if (!aFactory->isNotObligatory(theFeature->getKind(), theFeature->data()->id(aSel)))
+ if (!aFactory->isNotObligatory(theFeature->getKind(), theFeature->data()->id(aSel)) &&
+ aFactory->isCase(theFeature, theFeature->data()->id(aSel)))
aState = ModelAPI_StateInvalidArgument;
}
}
if (aSelAttr) {
if (!aSelAttr->update()) {
if (!aFactory->isNotObligatory(
- theFeature->getKind(), theFeature->data()->id(aSel)))
+ theFeature->getKind(), theFeature->data()->id(aSel)) &&
+ aFactory->isCase(theFeature, theFeature->data()->id(aSel)))
aState = ModelAPI_StateInvalidArgument;
}
}