mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-24 07:03:56 -06:00
Fix VersionUpgrade48to49 crashing if there is no "categories_expanded"
If the 4.8 is started from a clean install and no category gets expanded in the settings panel, then the "categories_expanded" key will not exist in the [cura] preferences in cura.cfg. As a result, when the 4.9 gets started in this specific case, the version upgrade 48 to 49 will produce a crash and will be considered as "failed", which will then lead to cura requesting from the user to go from the entire onboarding flow instead of landing on the "What's new" pages (even though everything else has been properly updated). This commit fixes that by checking whether the "categories_expanded" key exists in the cura.cfg.
This commit is contained in:
parent
b3ea26c955
commit
39e9dcd4f5
1 changed files with 1 additions and 1 deletions
|
@ -29,7 +29,7 @@ class VersionUpgrade48to49(VersionUpgrade):
|
|||
# Update visibility settings to include new top_bottom category
|
||||
parser["general"]["visible_settings"] += ";top_bottom"
|
||||
|
||||
if any([setting in parser["cura"]["categories_expanded"] for setting in self._moved_visibility_settings]):
|
||||
if "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"
|
||||
|
||||
result = io.StringIO()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue