mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-12 19:29:02 +08:00
Make lazy-load container a protected inner class
Contributes to issue CURA-6793.
This commit is contained in:
parent
f1e35907d2
commit
f69360fb14
@ -39,7 +39,7 @@ class ContainerTree:
|
||||
return cls.__instance
|
||||
|
||||
def __init__(self) -> None:
|
||||
self.machines = self.MachineNodeMap() # Mapping from definition ID to machine nodes with lazy loading.
|
||||
self.machines = self._MachineNodeMap() # Mapping from definition ID to machine nodes with lazy loading.
|
||||
self.materialsChanged = Signal() # Emitted when any of the material nodes in the tree got changed.
|
||||
cura.CuraApplication.CuraApplication.getInstance().initializationFinished.connect(self._onStartupFinished) # Start the background task to load more machine nodes after start-up is completed.
|
||||
|
||||
@ -82,7 +82,7 @@ class ContainerTree:
|
||||
## Dictionary-like object that contains the machines.
|
||||
#
|
||||
# This handles the lazy loading of MachineNodes.
|
||||
class MachineNodeMap:
|
||||
class _MachineNodeMap:
|
||||
def __init__(self) -> None:
|
||||
self._machines = {} # type: Dict[str, MachineNode]
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user