From 472d114c005e1c1e060c57e6e8c28fa50e360b5d Mon Sep 17 00:00:00 2001 From: "Zheng, Lei" Date: Thu, 19 Sep 2019 11:41:22 +0800 Subject: [PATCH] App: fix Document::isTransactionEmpty() --- src/App/Document.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/App/Document.cpp b/src/App/Document.cpp index 09f99c7326..b7f3e34884 100644 --- a/src/App/Document.cpp +++ b/src/App/Document.cpp @@ -1263,7 +1263,14 @@ int Document::getTransactionID(bool undo, unsigned pos) const { bool Document::isTransactionEmpty() const { if (d->activeUndoTransaction) { - return d->activeUndoTransaction->isEmpty(); + // Transactions are now only created when there are actual changes. + // Empty transaction is now significant for marking external changes. It + // is used to match ID with transactions in external documents and + // trigger undo/redo there. + + // return d->activeUndoTransaction->isEmpty(); + + return false; } return true;