]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Issue 152 : do not compact empty transactions becasue it causes problem in OCCT
authormpv <mikhail.ponikarov@opencascade.com>
Mon, 10 Nov 2014 14:43:30 +0000 (17:43 +0300)
committermpv <mikhail.ponikarov@opencascade.com>
Mon, 10 Nov 2014 14:43:30 +0000 (17:43 +0300)
src/Model/Model_Document.cpp

index 15983188d822ba65cc920976f75a969a671d04f4..7e2d215ee08360bdbbe599af8c63b7c057763e69 100644 (file)
@@ -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;
 }