Autosave edited spritesheets beside their files

With document autosave, spritesheets with unsaved pixel edits are written
to a hidden .<name>.png.autosave beside their PNG (only when changed since
their last autosave; a spritesheet edit alone also triggers the document
autosave). Restoring a document's autosave brings them back as unsaved
edits without touching the PNGs. The copies are removed when the
spritesheet is saved or reloaded, or the document's autosave is discarded.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
shweetandClaude Opus 5.5 committed 2026-10-03 21:28:02 -04:00
1 parent ded95f436a
commit ce3b544392
4 files changed
+66 -3

No files matched your search

+2 -1
View File
@@ -147,7 +147,8 @@ namespace anm2ed::imgui
for (auto i = 0; i < (int)manager.documents.size(); ++i)
{
auto& document = manager.documents[i];
auto isDirty = (document.is_dirty() || document.isForceDirty) && document.is_autosave_dirty();
auto isDirty = (document.is_dirty() || document.isForceDirty || document.spritesheet_any_dirty()) &&
document.is_autosave_dirty();
if (isDirty)
{
document.lastAutosaveTime += ImGui::GetIO().DeltaTime;