mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-06 22:47:29 -06:00
Added more robust fault handling for preferences while loading workspace
CURA-1263
This commit is contained in:
parent
b8ff7acb68
commit
dcdfe612e7
1 changed files with 13 additions and 2 deletions
|
@ -144,8 +144,19 @@ class ThreeMFWorkspaceReader(WorkspaceReader):
|
|||
|
||||
# Copy a number of settings from the temp preferences to the global
|
||||
global_preferences = Preferences.getInstance()
|
||||
global_preferences.setValue("general/visible_settings", temp_preferences.getValue("general/visible_settings"))
|
||||
global_preferences.setValue("cura/categories_expanded", temp_preferences.getValue("cura/categories_expanded"))
|
||||
|
||||
visible_settings = temp_preferences.getValue("general/visible_settings")
|
||||
if visible_settings is None:
|
||||
Logger.log("w", "Workspace did not contain visible settings. Leaving visibility unchanged")
|
||||
else:
|
||||
global_preferences.setValue("general/visible_settings", visible_settings)
|
||||
|
||||
categories_expanded = temp_preferences.getValue("cura/categories_expanded")
|
||||
if categories_expanded is None:
|
||||
Logger.log("w", "Workspace did not contain expanded categories. Leaving them unchanged")
|
||||
else:
|
||||
global_preferences.setValue("cura/categories_expanded", categories_expanded)
|
||||
|
||||
Application.getInstance().expandedCategoriesChanged.emit() # Notify the GUI of the change
|
||||
|
||||
self._id_mapping = {}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue