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.
This commit is contained in:
Ghostkeeper 2020-02-13 13:09:57 +01:00
parent 3b235d5536
commit a776f54e7f
No known key found for this signature in database
GPG key ID: 37E2020986774393

View file

@ -71,7 +71,7 @@ class PerObjectSettingVisibilityHandler(UM.Settings.Models.SettingVisibilityHand
# Add all instances that are not added, but are in visibility list # Add all instances that are not added, but are in visibility list
for item in visible: 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) definition = self._stack.getSettingDefinition(item)
if definition: if definition:
new_instance = SettingInstance(definition, settings) new_instance = SettingInstance(definition, settings)