some bullshit to fix potential crash

This commit is contained in:
2026-05-14 22:58:32 -04:00
parent 8f72f0aef5
commit b7b49eb81e
6 changed files with 89 additions and 12 deletions
+6 -2
View File
@@ -53,22 +53,26 @@ namespace anm2ed
redoStack.clear();
}
void Snapshots::undo()
bool Snapshots::undo()
{
if (auto snapshot = undoStack.pop())
{
redoStack.push(current);
current = *snapshot;
return true;
}
return false;
}
void Snapshots::redo()
bool Snapshots::redo()
{
if (auto snapshot = redoStack.pop())
{
undoStack.push(current);
current = *snapshot;
return true;
}
return false;
}
void Snapshots::reset()