From: nds Date: Thu, 30 Mar 2017 08:10:52 +0000 (+0300) Subject: Issue #2027 Modification of data strtucture outside of transaction when create circle... X-Git-Tag: V_2.7.0~132 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=37fa3ebba9b6fcb101c6b5e582f49b5cc87ddea9;p=modules%2Fshaper.git Issue #2027 Modification of data strtucture outside of transaction when create circle on face of box Modification is proposed by MPV --- diff --git a/src/Model/Model_Document.cpp b/src/Model/Model_Document.cpp index 0eea8c4ff..9ff99fbad 100755 --- a/src/Model/Model_Document.cpp +++ b/src/Model/Model_Document.cpp @@ -554,7 +554,6 @@ bool Model_Document::finishOperation() static std::shared_ptr aFinishMsg (new Events_Message(Events_Loop::eventByName("FinishOperation"))); Events_Loop::loop()->send(aFinishMsg); - Events_Loop::loop()->autoFlush(Events_Loop::eventByName(EVENT_OBJECT_UPDATED), false); } // to avoid "updated" message appearance by updater //aLoop->clear(Events_Loop::eventByName(EVENT_OBJECT_UPDATED)); @@ -567,6 +566,11 @@ bool Model_Document::finishOperation() if (subDoc(*aSubIter)->finishOperation()) aResult = true; + // sub-Part may send updated by flush of deleted (macro circle) + if (isRoot()) { // once for root document + Events_Loop::loop()->autoFlush(Events_Loop::eventByName(EVENT_OBJECT_UPDATED), false); + } + // transaction may be empty if this document was created during this transaction (create part) if (!myTransactions.empty() && myDoc->CommitCommand()) { // if commit is successfull, just increment counters