Fixed the manager's 'cancel' implementation: with this, redo of a cancelled operation isn't possible any more

This commit is contained in:
Matthias Koefferlein 2020-12-13 22:13:51 +01:00
parent 92d81c5844
commit ee47a1e087
1 changed files with 4 additions and 6 deletions

View File

@ -156,16 +156,14 @@ Manager::cancel ()
m_opened = false;
if (m_current->first.begin () != m_current->first.end ()) {
++m_current;
undo ();
} else {
// empty transactions .. just delete
erase_transactions (m_current, m_transactions.end ());
m_current = m_transactions.end ();
}
// wipe following history as we don't want the cancelled operation to be redoable
erase_transactions (m_current, m_transactions.end ());
m_current = m_transactions.end ();
}
}