Fix AutoSave conflicts with BackupManager

- Move AutoSave out of the plugins. It's a built-in module now.
 - Add enable/disable saving data on CuraApplication.
 - Avoid saving data in backup restore
This commit is contained in:
Lipu Fei 2018-05-23 11:24:33 +02:00
parent 41aa31cb2d
commit cfd1b7b813
5 changed files with 22 additions and 51 deletions

View file

@ -48,7 +48,9 @@ class BackupsManager:
def _disableAutoSave(self):
"""Here we try to disable the auto-save plugin as it might interfere with restoring a backup."""
# TODO: Disable auto-save if possible.
CuraApplication.getInstance().setSaveDataEnabled(False)
def _enableAutoSave(self):
"""Re-enable auto-save after we're done."""
# TODO: Enable auto-save if possible.
CuraApplication.getInstance().setSaveDataEnabled(True)