chaiNNer icon indicating copy to clipboard operation
chaiNNer copied to clipboard

Autosave

Open 0x4E69676874466F78 opened this issue 3 years ago • 5 comments

Save the current canvas when (options):

  1. the window becomes out of focus
  2. every n-minutes (default: 3)

If the canvas has not yet been saved to own file, then save the canvas result to a temporary autosave file.

0x4E69676874466F78 avatar Aug 20 '22 09:08 0x4E69676874466F78

Auto-saving to the current save file is generally not a good idea. Users frequently make temporary changes that they don't want to save, so we shouldn't force them to make the tradeoff between no auto saves and auto-saving everything.

While implementing auto saves into a temporary file would be rather easy (we already track all changes being made for the undo/redo functionality), I wonder if it would even be useful. We already have a little "Hey, there are unsaved changes" warning if you're about to lose anything. I'm probably misunderstanding the intention here, so what is the use case for auto saves?

RunDevelopment avatar Aug 20 '22 10:08 RunDevelopment

@RunDevelopment This is protection against crash app/BSOD/loss of electricity. If you think this is not needed by default, turn these settings off by default.

0x4E69676874466F78 avatar Aug 20 '22 10:08 0x4E69676874466F78

This is protection against crash app/BSOD/loss of electricity.

That's a good use case.

I would probably do it like: Chainner constantly saves the current canvas to a temporary file. If Chainner crashes (with or without the rest of the system), then this file will be present, and we tell you "Chainner crashed last time, do you want to continue where you left off?" and load the temporary file. If you exit Chainner normally, it will delete the temporary file.

We could even extend this into a general "continue where you left off" feature and get rid of the "unsaved changes" warning (maybe via a setting).

Thoughts?

RunDevelopment avatar Aug 20 '22 10:08 RunDevelopment

@RunDevelopment correctly!

0x4E69676874466F78 avatar Aug 20 '22 10:08 0x4E69676874466F78