Properly save setting visibility when auto saving

Contributes to CURA-511
This commit is contained in:
Arjen Hiemstra 2016-02-17 14:34:54 +01:00
parent 765185364f
commit 40ea87fa05

View file

@ -13,7 +13,6 @@ class AutoSave(Extension):
def __init__(self): def __init__(self):
super().__init__() super().__init__()
#Preferences.getInstance().preferenceChanged.connect(self._onPreferenceChanged)
Preferences.getInstance().preferenceChanged.connect(self._triggerTimer) Preferences.getInstance().preferenceChanged.connect(self._triggerTimer)
machine_manager = Application.getInstance().getMachineManager() machine_manager = Application.getInstance().getMachineManager()
@ -52,8 +51,11 @@ class AutoSave(Extension):
self._saving = True # To prevent the save process from triggering another autosave. self._saving = True # To prevent the save process from triggering another autosave.
Logger.log("d", "Autosaving preferences, instances and profiles") Logger.log("d", "Autosaving preferences, instances and profiles")
machine_manager = Application.getInstance().getMachineManager()
machine_manager.saveVisibility()
machine_manager.saveMachineInstances()
machine_manager.saveProfiles()
Preferences.getInstance().writeToFile(Resources.getStoragePath(Resources.Preferences, Application.getInstance().getApplicationName() + ".cfg")) Preferences.getInstance().writeToFile(Resources.getStoragePath(Resources.Preferences, Application.getInstance().getApplicationName() + ".cfg"))
Application.getInstance().getMachineManager().saveMachineInstances()
Application.getInstance().getMachineManager().saveProfiles()
self._saving = False self._saving = False