From a7593f636f660158e86be65dfae61fb606f3de42 Mon Sep 17 00:00:00 2001 From: mpv Date: Mon, 10 Nov 2014 17:43:30 +0300 Subject: [PATCH] Issue 152 : do not compact empty transactions becasue it causes problem in OCCT --- src/Model/Model_Document.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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; } -- 2.39.2