void Model_Session::startOperation(const std::string& theId, const bool theAttachedToNested)
{
- myOperationAttachedToNext = theAttachedToNested;
+ myOperationAttachedToNext.push_back(theAttachedToNested);
ROOT_DOC->startOperation();
ROOT_DOC->operationId(theId);
static std::shared_ptr<Events_Message> aStartedMsg
{
setCheckTransactions(false);
ROOT_DOC->finishOperation();
- if (myOperationAttachedToNext) { // twice, with nested
+ while(myOperationAttachedToNext.back()) { // with nested, the first transaction can not be attached
ROOT_DOC->finishOperation();
- myOperationAttachedToNext = false;
+ myOperationAttachedToNext.pop_back();
}
+ myOperationAttachedToNext.pop_back();
setCheckTransactions(true);
}
{
setCheckTransactions(false);
ROOT_DOC->abortOperation();
- if (myOperationAttachedToNext) { // twice, with nested
+ while(myOperationAttachedToNext.back()) { // with nested, the first transaction can not be attached
ROOT_DOC->abortOperation();
- myOperationAttachedToNext = false;
+ myOperationAttachedToNext.pop_back();
}
+ myOperationAttachedToNext.pop_back();
setCheckTransactions(true);
// here the update mechanism may work after abort, so, suppress the warnings about
// modifications outside of the transactions
{
myPluginsInfoLoaded = false;
myCheckTransactions = true;
- myOperationAttachedToNext = false;
ModelAPI_Session::setSession(std::shared_ptr<ModelAPI_Session>(this));
// register the configuration reading listener
Events_Loop* aLoop = Events_Loop::loop();