some bullshit to fix potential crash

This commit is contained in:
shweet committed 2026-05-14 22:58:32 -04:00
1 parent 8f72f0aef5
commit b7b49eb81e
6 files changed
+89 -12

No files matched your search

+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()