mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-14 18:27:51 -06:00
Switch to the new quality profile when it is created
This commit is contained in:
parent
a8bd57a9eb
commit
d2ffd59431
3 changed files with 44 additions and 15 deletions
|
@ -240,8 +240,7 @@ class CuraApplication(QtApplication):
|
|||
if kwargs["parsed_command_line"].get("trigger_early_crash", False):
|
||||
assert not "This crash is triggered by the trigger_early_crash command line argument."
|
||||
|
||||
# new stuff
|
||||
self._variant_manager = VariantManager(ContainerRegistry.getInstance())
|
||||
self._variant_manager = None
|
||||
|
||||
self.default_theme = "cura-light"
|
||||
|
||||
|
@ -723,9 +722,6 @@ class CuraApplication(QtApplication):
|
|||
return False
|
||||
return True
|
||||
|
||||
def getVariantManager(self):
|
||||
return self._variant_manager
|
||||
|
||||
def preRun(self):
|
||||
# Last check for unknown commandline arguments
|
||||
parser = self.getCommandlineParser()
|
||||
|
@ -743,14 +739,15 @@ class CuraApplication(QtApplication):
|
|||
self.preRun()
|
||||
|
||||
container_registry = ContainerRegistry.getInstance()
|
||||
self._variant_manager = VariantManager(container_registry)
|
||||
self._variant_manager.initialize()
|
||||
|
||||
from cura.Machines.MaterialManager import MaterialManager
|
||||
self._material_manager = MaterialManager(container_registry)
|
||||
self._material_manager = MaterialManager(container_registry, parent = self)
|
||||
self._material_manager.initialize()
|
||||
|
||||
from cura.Machines.QualityManager import QualityManager
|
||||
self._quality_manager = QualityManager(container_registry)
|
||||
self._quality_manager = QualityManager(container_registry, parent = self)
|
||||
self._quality_manager.initialize()
|
||||
|
||||
self.getMachineManager() # ensure creation of machine manager
|
||||
|
@ -856,6 +853,16 @@ class CuraApplication(QtApplication):
|
|||
self._extruder_manager = ExtruderManager.createExtruderManager()
|
||||
return self._extruder_manager
|
||||
|
||||
def getVariantManager(self, *args):
|
||||
return self._variant_manager
|
||||
|
||||
def getMaterialManager(self, *args):
|
||||
return self._material_manager
|
||||
|
||||
@pyqtSlot(result = QObject)
|
||||
def getQualityManager(self, *args):
|
||||
return self._quality_manager
|
||||
|
||||
def getObjectsModel(self, *args):
|
||||
if self._object_manager is None:
|
||||
self._object_manager = ObjectsModel.createObjectsModel()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue