mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-24 07:03:56 -06:00
CURA-5334 Ensure the material manager is fetched before call
This commit is contained in:
parent
95f7251486
commit
49abf38210
1 changed files with 1 additions and 4 deletions
|
@ -129,6 +129,7 @@ class MachineSettingsAction(MachineAction):
|
|||
return
|
||||
|
||||
machine_manager = self._application.getMachineManager()
|
||||
material_manager = self._application.getMaterialManager()
|
||||
extruder_positions = list(self._global_container_stack.extruders.keys())
|
||||
has_materials = self._global_container_stack.getProperty("machine_gcode_flavor", "value") != "UltiGCode"
|
||||
|
||||
|
@ -138,10 +139,6 @@ class MachineSettingsAction(MachineAction):
|
|||
self._global_container_stack.setMetaDataEntry("has_materials", True)
|
||||
else:
|
||||
self._global_container_stack.addMetaDataEntry("has_materials", True)
|
||||
|
||||
# Set the material container for each extruder to a sane default
|
||||
material_manager = self._application.getMaterialManager()
|
||||
|
||||
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