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
This commit is contained in:
Arjen Hiemstra 2016-05-23 02:18:20 +02:00
parent dcb27e23ed
commit 63b623a6ef

View file

@ -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
pass