+ if (!aResult && !myTransactions.empty() /* it can be for just created part document */)
+ aResult = *(myTransactions.rbegin()) != 0;
+
+ if (!aResult && Model_Session::get()->moduleDocument().get() == this) {
+ // nothing inside in all documents, so remove this transaction from the transactions list
+ undoInternal(true, false);
+ myDoc->ClearRedos();
+ myRedos.clear();
+ }
+ return aResult;