mirror of https://github.com/KLayout/klayout.git
Fixed the manager's 'cancel' implementation: with this, redo of a cancelled operation isn't possible any more
This commit is contained in:
parent
92d81c5844
commit
ee47a1e087
|
|
@ -156,15 +156,13 @@ Manager::cancel ()
|
||||||
m_opened = false;
|
m_opened = false;
|
||||||
|
|
||||||
if (m_current->first.begin () != m_current->first.end ()) {
|
if (m_current->first.begin () != m_current->first.end ()) {
|
||||||
|
|
||||||
++m_current;
|
++m_current;
|
||||||
undo ();
|
undo ();
|
||||||
|
}
|
||||||
|
|
||||||
} else {
|
// wipe following history as we don't want the cancelled operation to be redoable
|
||||||
// empty transactions .. just delete
|
|
||||||
erase_transactions (m_current, m_transactions.end ());
|
erase_transactions (m_current, m_transactions.end ());
|
||||||
m_current = m_transactions.end ();
|
m_current = m_transactions.end ();
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue