From 63b623a6ef9b557924fb45b918f0cc699c93a80f Mon Sep 17 00:00:00 2001 From: Arjen Hiemstra Date: Mon, 23 May 2016 02:18:20 +0200 Subject: [PATCH] Move global_only property declaration to before the super() call so containerregistry knows about it when loading Also, properly set its type to function and default to False --- cura/CuraApplication.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/cura/CuraApplication.py b/cura/CuraApplication.py index c46833f6e0..bfe342d1e4 100644 --- a/cura/CuraApplication.py +++ b/cura/CuraApplication.py @@ -85,6 +85,9 @@ class CuraApplication(QtApplication): self._open_file_queue = [] # Files to open when plug-ins are loaded. + # Need to do this before ContainerRegistry tries to load the machines + SettingDefinition.addSupportedProperty("global_only", DefinitionPropertyType.Function, default = False) + super().__init__(name = "cura", version = CuraVersion) self.setWindowIcon(QIcon(Resources.getPath(Resources.Images, "cura-icon.png"))) @@ -119,8 +122,6 @@ class CuraApplication(QtApplication): Resources.addType(self.ResourceTypes.QmlFiles, "qml") Resources.addType(self.ResourceTypes.Firmware, "firmware") - SettingDefinition.addSupportedProperty("global_only", DefinitionPropertyType.String, default = "False") - ## Add the 4 types of profiles to storage. Resources.addStorageType(self.ResourceTypes.QualityInstanceContainer, "quality") Resources.addStorageType(self.ResourceTypes.VariantInstanceContainer, "variants") @@ -715,4 +716,4 @@ class CuraApplication(QtApplication): def _addProfileReader(self, profile_reader): # TODO: Add the profile reader to the list of plug-ins that can be used when importing profiles. - pass \ No newline at end of file + pass