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:
fieldOfView 2016-10-03 15:29:25 +02:00
parent 5d1b77c551
commit 2f57d0fb6e
2 changed files with 55 additions and 10 deletions

View file

@ -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):