mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-06 14:37:29 -06:00
Fix crash when visible_settings is missing from pre-4.8 project files
Found this while testing the new Qt interface.
This commit is contained in:
parent
9fa6698da3
commit
60c91b5680
1 changed files with 3 additions and 2 deletions
|
@ -29,9 +29,10 @@ class VersionUpgrade48to49(VersionUpgrade):
|
|||
parser["general"]["version"] = "7"
|
||||
|
||||
# Update visibility settings to include new top_bottom category
|
||||
parser["general"]["visible_settings"] += ";top_bottom"
|
||||
if "visible_settings" in parser["general"]:
|
||||
parser["general"]["visible_settings"] += ";top_bottom"
|
||||
|
||||
if "categories_expanded" in parser["cura"] and any([setting in parser["cura"]["categories_expanded"] for setting in self._moved_visibility_settings]):
|
||||
if "cura" in parser and "categories_expanded" in parser["cura"] and any([setting in parser["cura"]["categories_expanded"] for setting in self._moved_visibility_settings]):
|
||||
parser["cura"]["categories_expanded"] += ";top_bottom"
|
||||
|
||||
# If the account scope in 4.8 is outdated, delete it so that the user is enforced to log in again and get the
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue