From 9501f9b17c93ba260de324dafea7526b4bda71fc Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Wed, 21 Sep 2016 14:36:25 +0200 Subject: [PATCH] Make VersionUpgradeManager a singleton This way we can access the manager from anywhere, without adding a getter to CuraApplication or something. Contributes to issue CURA-844. --- cura/CuraApplication.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cura/CuraApplication.py b/cura/CuraApplication.py index a4d2043146..702f8d6078 100644 --- a/cura/CuraApplication.py +++ b/cura/CuraApplication.py @@ -112,7 +112,7 @@ class CuraApplication(QtApplication): ## Initialise the version upgrade manager with Cura's storage paths. import UM.VersionUpgradeManager #Needs to be here to prevent circular dependencies. - self._version_upgrade_manager = UM.VersionUpgradeManager.VersionUpgradeManager( + UM.VersionUpgradeManager.VersionUpgradeManager.getInstance().setCurrentVersions( { ("quality", UM.Settings.InstanceContainer.Version): (self.ResourceTypes.QualityInstanceContainer, "application/x-uranium-instancecontainer"), ("machine_stack", UM.Settings.ContainerStack.Version): (self.ResourceTypes.MachineStack, "application/x-uranium-containerstack"),