mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-24 23:23:57 -06:00
Rudimentary restore functionality
This commit is contained in:
parent
a394448dee
commit
79cebca9f0
2 changed files with 28 additions and 6 deletions
|
@ -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."""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue