Make undo/redo work for:
undo (n) where n > 1 redo (m) where m < n new transaction. Previously the redo list was left untouched. This would lead to utter nonsense in the redo list. AFAICT this never worked.
This commit is contained in:
parent
ec37c83507
commit
6b9415aedb
|
@ -220,6 +220,13 @@ UndoHistory::add (UndoTransaction* const ut)
|
|||
}
|
||||
|
||||
UndoList.push_back (ut);
|
||||
/* Adding a transacrion means that redo is meaningless from this point. */
|
||||
_clearing = true;
|
||||
for (std::list<UndoTransaction*>::iterator i = RedoList.begin(); i != RedoList.end(); ++i) {
|
||||
delete *i;
|
||||
}
|
||||
RedoList.clear ();
|
||||
_clearing = false;
|
||||
|
||||
/* we are now owners of the transaction and must delete it when finished with it */
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user