New backup feature

Yeah… I probably could have explained it better, and of course a pic would have made even more sense.

I’m thinking that the list should all be checked as a default, and a user can uncheck those files not to restore. That way the default acts like it currently does with all files being restored. Or more specifically as far as the autosave (A) files maybe we should refer to it as “recovered” to differentiate between restoring a versioned autosave or backup file?

1 Like

I went ahead and created a new “recover” dialog… yes it does work nicely/ :smile:

Again… this dialog will pop up when (re)starting the Seamly2D app IF there were any patterns open with unsaved changes due to either some sort of crash OR if the pattern was closed without saving. It will display 5 files, and if necessary scrollbars will appear if there are more files or if the path name is really long.


Another addition I made (if the build is made with Qt 5.15.0 or newer) is when ANY of the A, V or B files are deleted by the app - either when removing an xxx.val.autosave file when a pattern is saved, when removing older versioned or backups when the max number limit has been reached, or when a user intentionally deletes a file in the Restore dialog via the context menu - the file is moved to the trash bin rather than being permanently removed. This is just one last chance to recover a pattern. Short of an act of God, there should be no reason to ever loose a pattern. :slight_smile:


Brilliant!!! Very well done! :star_struck: :star_struck: :star_struck:

I figured a picture… um screencap would be worth a 1000 words/ :slight_smile:

BTW… I’ve run into some unanticipated behavior. Both relate to the max num limit of versioned and backup files. Currently the limits applies to the total number of each type respectively in the autosave directory and not the max number limit PER filename (pattern).

I’m thinking the max number should apply to each filename and not the total number. Thoughts anyone?

Also in regards to the max number… if the maximum is changed to a lower limit while there are a greater number of versioned | backups in the autosave dir - the next update will cause more files to be removed than anticipated. I’m wondering if throwing up a warning to the effect that x number of files will be removed next versioned | backup autosave?

1 Like

Decided to add a preference option to enable the moves to the Trash… in case a user finds the number of files moving to the trash overwhelming. If you have several patterns open at a time with a short interval (1 min), with auto & versioned saves enabled you could easily be moving 3, 4, 6 or more files per minute to the trash. A single pattern with a more reasonable interval (5 min?) would be more manageable.



Blockquote I was thinking of instead of the current plain message box, I could have a dialog box, where by using a Qtablewidget a user could set a checkbox for those to restore?

It sounds like this would work similarly to the “recover files” feature that is invoked in LibreOffice Writer and that would be a very reasonable approach


Didn’t think to look at LibreOffice… will have to check it out.

While most users are probably not going to have that many open patterns, the dialog I did with a check able list is definitely an improvement. Currently if a recovery is needed it’s all or none for how ever many files were left unsaved. Also since I have changed the autosave feature to include any files that had changes, but you closed them anyways - intentionally or by accident - they would be listed in the recovery dialog. You would now have another chance to recover a file in case it was an accident OR ignore it.

UPDATE: I took a look at the LibreOffice recovery… Opened a file, started a New and then stopped the app in the Task Manager to force a crash state. Booted LO back up and it displays:


and after you Click start the dialog updates to:


Clicking Finish opens the documents. It’s better than what Seamly2D currently has, but there’s a few behaviors I don’t like. 1) You have no choice which documents to recover. 2) While the “Start” button is explantory, it does not indicate that the documents will Open. 3) The use of a progress bar is questionable - as it goes so quick. 4) The use of “Finish” is also a waste of a step (time)… there’s really no need to update the dialog and progress bar… and then have to click Finish Just recover and open the files.

I do like using “Discard” instead of “Cancel” though. It’s a bit more clear that the (unsaved / damaged) file will be discarded than what cancel would indicate.


I had not thought that through, because of the way I use libre writer… I agree with you that Discard is more descriptive than Cancel in the context of Seamly. With libre writer I usually have only one out of many files that I really care about.

1 Like