mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-14 18:27:51 -06:00
Add variants as they get added to the registry
Contributes to issue CURA-6600.
This commit is contained in:
parent
e84a75094a
commit
2565be01f3
2 changed files with 25 additions and 4 deletions
|
@ -16,10 +16,10 @@ from typing import Dict
|
|||
class ContainerTree:
|
||||
def __init__(self) -> None:
|
||||
self.machines = {} # type: Dict[str, MachineNode] # Mapping from definition ID to machine nodes.
|
||||
ContainerRegistry.getInstance().containerAdded.connect(self.machineAdded)
|
||||
ContainerRegistry.getInstance().containerAdded.connect(self._machineAdded)
|
||||
|
||||
## When a printer gets added, we need to build up the tree for that container.
|
||||
def machineAdded(self, definition_container: ContainerInterface):
|
||||
def _machineAdded(self, definition_container: ContainerInterface):
|
||||
if not isinstance(definition_container, DefinitionContainer):
|
||||
return # Not our concern.
|
||||
definition_id = definition_container.getId()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue