From: mpv Date: Mon, 10 Nov 2014 14:43:30 +0000 (+0300) Subject: Issue 152 : do not compact empty transactions becasue it causes problem in OCCT X-Git-Tag: V_0.5~6^2~4^2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=a7593f636f660158e86be65dfae61fb606f3de42;p=modules%2Fshaper.git Issue 152 : do not compact empty transactions becasue it causes problem in OCCT --- diff --git a/src/Model/Model_Document.cpp b/src/Model/Model_Document.cpp index 15983188d..7e2d215ee 100644 --- a/src/Model/Model_Document.cpp +++ b/src/Model/Model_Document.cpp @@ -253,7 +253,13 @@ bool Model_Document::compactNested() } myIsEmptyTr[myTransactionsAfterSave] = allWasEmpty; myTransactionsAfterSave++; - myDoc->PerformDeltaCompaction(); + if (allWasEmpty) { + // if everything is empty, it is a problem for OCCT to work with it, + // just commit the empty that returns nothing + myDoc->CommitCommand(); + } else { + myDoc->PerformDeltaCompaction(); + } return !allWasEmpty; }