mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-06 14:37:29 -06:00
Use stack properties instead of .findContainer(type = ...)
Recently we changed the empty containers such that there is only one empty container instance and it doesn't have the proper type any more. Instead we have properties on the stack that allows us to find the container with the proper type. It's faster and easier to use. We've had a few bugs about this so I decided to update all of them to remove those for the future, except the ones in plugins/MachineSettingsAction/MachineSettingsAction.py because we have a pending pull request that fixes those. Fixing them would give merge conflicts for fieldOfView. It doesn't really belong to CURA-4024 but I'm sticking it under that nomer anyway to get it reviewed.
This commit is contained in:
parent
4ad9ebc444
commit
81e07b1530
4 changed files with 11 additions and 15 deletions
|
@ -36,7 +36,7 @@ class UMOUpgradeSelection(MachineAction):
|
|||
global_container_stack = Application.getInstance().getGlobalContainerStack()
|
||||
if global_container_stack:
|
||||
# Make sure there is a definition_changes container to store the machine settings
|
||||
definition_changes_container = global_container_stack.findContainer({"type": "definition_changes"})
|
||||
definition_changes_container = global_container_stack.definition_changes
|
||||
if not definition_changes_container:
|
||||
definition_changes_container = self._createDefinitionChangesContainer(global_container_stack)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue