mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-06 14:37:29 -06:00
Only use setMetaDataEntry()
This commit is contained in:
parent
76417b7fb2
commit
af02dc2758
23 changed files with 91 additions and 106 deletions
|
@ -135,10 +135,7 @@ class MachineSettingsAction(MachineAction):
|
|||
|
||||
material_node = None
|
||||
if has_materials:
|
||||
if "has_materials" in self._global_container_stack.getMetaData():
|
||||
self._global_container_stack.setMetaDataEntry("has_materials", True)
|
||||
else:
|
||||
self._global_container_stack.addMetaDataEntry("has_materials", True)
|
||||
self._global_container_stack.setMetaDataEntry("has_materials", True)
|
||||
else:
|
||||
# The metadata entry is stored in an ini, and ini files are parsed as strings only.
|
||||
# Because any non-empty string evaluates to a boolean True, we have to remove the entry to make it False.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue