App: fix Document::isTransactionEmpty()

This commit is contained in:
Zheng, Lei
2019-09-19 11:41:22 +08:00
committed by wmayer
parent 846707c628
commit c26081f7dc

View File

@@ -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;