From a776f54e7f3ad626943b05340309cd7445352c7d Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Thu, 13 Feb 2020 13:09:57 +0100 Subject: [PATCH] Fix making settings visible if the default was 0 If the default was 0, then the if statement would evaluate as False and it would not make them visible until you closed and re-opened the panel. Contributes to issue CURA-7211. --- .../PerObjectSettingsTool/PerObjectSettingVisibilityHandler.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/PerObjectSettingsTool/PerObjectSettingVisibilityHandler.py b/plugins/PerObjectSettingsTool/PerObjectSettingVisibilityHandler.py index fb78134833..ea64ddbb35 100644 --- a/plugins/PerObjectSettingsTool/PerObjectSettingVisibilityHandler.py +++ b/plugins/PerObjectSettingsTool/PerObjectSettingVisibilityHandler.py @@ -71,7 +71,7 @@ class PerObjectSettingVisibilityHandler(UM.Settings.Models.SettingVisibilityHand # Add all instances that are not added, but are in visibility list for item in visible: - if not settings.getInstance(item): # Setting was not added already. + if settings.getInstance(item) is not None: # Setting was not added already. definition = self._stack.getSettingDefinition(item) if definition: new_instance = SettingInstance(definition, settings)