mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-18 20:28:01 -06:00
Make lazy-load container a protected inner class
Contributes to issue CURA-6793.
This commit is contained in:
parent
f1e35907d2
commit
f69360fb14
1 changed files with 2 additions and 2 deletions
|
@ -39,7 +39,7 @@ class ContainerTree:
|
||||||
return cls.__instance
|
return cls.__instance
|
||||||
|
|
||||||
def __init__(self) -> None:
|
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.
|
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.
|
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.
|
## Dictionary-like object that contains the machines.
|
||||||
#
|
#
|
||||||
# This handles the lazy loading of MachineNodes.
|
# This handles the lazy loading of MachineNodes.
|
||||||
class MachineNodeMap:
|
class _MachineNodeMap:
|
||||||
def __init__(self) -> None:
|
def __init__(self) -> None:
|
||||||
self._machines = {} # type: Dict[str, MachineNode]
|
self._machines = {} # type: Dict[str, MachineNode]
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue