// the plane should be executed in order to build the feature result immediatelly
// the results are to be hidden in the plugin
aPlane->execute();
+ // this flag is needed here to avoid setting it inside of the next transaction
+ // (may cause crash on redo of the first transaction in OCAF)
+ aPlane->data()->execState(ModelAPI_StateDone);
+ aPlane->firstResult()->data()->execState(ModelAPI_StateDone);
return aPlane;
}
// the point should be executed in order to build the feature result immediatelly
// the results are to be hidden in the plugin
aPoint->execute();
+ aPoint->data()->execState(ModelAPI_StateDone);
+ aPoint->firstResult()->data()->execState(ModelAPI_StateDone);
return aPoint;
}
while (!myResults.empty()) { // remove one by one with messages
std::shared_ptr<ModelAPI_Result> aRes = *(myResults.begin());
aRes->setDisabled(aRes, true); // to avoid activation of the Part result
- myResults.erase(myResults.begin());
+ if (!myResults.empty()) // disabling result may erase the list (on undo of Part, issue 665)
+ myResults.erase(myResults.begin());
}
ModelAPI_Object::erase();
}