[nostalgia/studio] Get Undo/Redo working

This commit is contained in:
2022-02-16 20:16:49 -06:00
parent 72ce8ea4d9
commit c92ecdf499
5 changed files with 30 additions and 12 deletions

View File

@@ -22,8 +22,8 @@ void UndoStack::redo() noexcept {
}
void UndoStack::undo() noexcept {
if (m_stackIdx < ox::MaxValue<decltype(m_stackIdx)>) {
m_stack[m_stackIdx--]->undo();
if (m_stackIdx) {
m_stack[--m_stackIdx]->undo();
}
}