mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-11-02 20:52:20 -07:00
WIP: Create VariantManager
This commit is contained in:
parent
86eb9b925f
commit
55bdc0c853
8 changed files with 228 additions and 36 deletions
|
|
@ -59,6 +59,8 @@ from cura.Settings.SettingInheritanceManager import SettingInheritanceManager
|
|||
from cura.Settings.UserProfilesModel import UserProfilesModel
|
||||
from cura.Settings.SimpleModeSettingsManager import SimpleModeSettingsManager
|
||||
|
||||
from cura.Machines.VariantManager import VariantManager
|
||||
|
||||
|
||||
from . import PlatformPhysics
|
||||
from . import BuildVolume
|
||||
|
|
@ -233,6 +235,9 @@ 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.default_theme = "cura-light"
|
||||
|
||||
self.setWindowIcon(QIcon(Resources.getPath(Resources.Images, "cura-icon.png")))
|
||||
|
|
@ -707,6 +712,9 @@ 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()
|
||||
|
|
@ -723,6 +731,9 @@ class CuraApplication(QtApplication):
|
|||
def run(self):
|
||||
self.preRun()
|
||||
|
||||
container_registry = ContainerRegistry.getInstance()
|
||||
self._variant_manager.initialize()
|
||||
|
||||
# Check if we should run as single instance or not
|
||||
self._setUpSingleInstanceServer()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue