Browse Source

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.
Ghostkeeper 5 years ago
parent
commit
a776f54e7f

+ 1 - 1
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)