mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-11 08:47:50 -06:00
Import profiles for the current machine
Takes into consideration printers that use quality-profiles from other printers, while gracefully handling mismatches in the number of extruders Fixes CURA-2500, contributes to CURA-2478
This commit is contained in:
parent
5d1b77c551
commit
2f57d0fb6e
2 changed files with 55 additions and 10 deletions
|
@ -678,6 +678,16 @@ class ContainerManager(QObject):
|
|||
duplicated_container.setDirty(True)
|
||||
self._container_registry.addContainer(duplicated_container)
|
||||
|
||||
## Get the singleton instance for this class.
|
||||
@classmethod
|
||||
def getInstance(cls):
|
||||
# Note: Explicit use of class name to prevent issues with inheritance.
|
||||
if ContainerManager.__instance is None:
|
||||
ContainerManager.__instance = cls()
|
||||
return ContainerManager.__instance
|
||||
|
||||
__instance = None
|
||||
|
||||
# Factory function, used by QML
|
||||
@staticmethod
|
||||
def createContainerManager(engine, js_engine):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue