Don't reset all invisible settings

Why would you need to reset all invisible settings? It shouldn't matter whether a setting is visible or not.
This is causing bugs because the settings that are being reset are not necessarily extruder-type settings (as that is checked below). They are being reset to the value self._default_extruder, which is not always a valid setting value.

Fixes #4274.
This commit is contained in:
Cherubim 2019-05-28 15:08:03 +02:00
parent e1bb783bcd
commit 63cd3a52ce
No known key found for this signature in database
GPG Key ID: 6E03595319423F70

View File

@ -893,13 +893,6 @@ class MachineManager(QObject):
result = [] # type: List[str]
for setting_instance in container.findInstances():
setting_key = setting_instance.definition.key
setting_enabled = self._global_container_stack.getProperty(setting_key, "enabled")
if not setting_enabled:
# A setting is not visible anymore
result.append(setting_key)
Logger.log("d", "Reset setting [%s] from [%s] because the setting is no longer enabled", setting_key, container)
continue
if not self._global_container_stack.getProperty(setting_key, "type") in ("extruder", "optional_extruder"):
continue