Rudimentary restore functionality

This commit is contained in:
ChrisTerBeke 2018-05-11 16:45:32 +02:00
parent a394448dee
commit 79cebca9f0
2 changed files with 28 additions and 6 deletions

View file

@ -4,6 +4,7 @@ from typing import Optional
from UM.Logger import Logger
from cura.Backups.Backup import Backup
from cura.CuraApplication import CuraApplication
class BackupsManager:
@ -40,7 +41,10 @@ class BackupsManager:
self._disableAutoSave()
backup = Backup(zip_file = zip_file, meta_data = meta_data)
backup.restore() # At this point, Cura will need to restart for the changes to take effect
restored = backup.restore()
if restored:
# At this point, Cura will need to restart for the changes to take effect.
CuraApplication.getInstance().windowClosed()
def _disableAutoSave(self):
"""Here we try to disable the auto-save plugin as it might interfere with restoring a backup."""