mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-12-04 08:11:09 -07:00
ContainerRegistry only getInstance once.
This commit is contained in:
parent
cf2cfa3c45
commit
191a318df6
1 changed files with 2 additions and 1 deletions
|
|
@ -128,6 +128,7 @@ class CuraContainerRegistry(ContainerRegistry):
|
||||||
return { "status": "error", "message": catalog.i18nc("@info:status", "Failed to import profile from <filename>{0}</filename>: <message>{1}</message>", file_name, "Invalid path")}
|
return { "status": "error", "message": catalog.i18nc("@info:status", "Failed to import profile from <filename>{0}</filename>: <message>{1}</message>", file_name, "Invalid path")}
|
||||||
|
|
||||||
plugin_registry = PluginRegistry.getInstance()
|
plugin_registry = PluginRegistry.getInstance()
|
||||||
|
container_registry = ContainerRegistry.getInstance()
|
||||||
for plugin_id, meta_data in self._getIOPlugins("profile_reader"):
|
for plugin_id, meta_data in self._getIOPlugins("profile_reader"):
|
||||||
profile_reader = plugin_registry.getPluginObject(plugin_id)
|
profile_reader = plugin_registry.getPluginObject(plugin_id)
|
||||||
try:
|
try:
|
||||||
|
|
@ -145,7 +146,7 @@ class CuraContainerRegistry(ContainerRegistry):
|
||||||
else:
|
else:
|
||||||
for profile in profile_or_list:
|
for profile in profile_or_list:
|
||||||
if profile.getId() != "":
|
if profile.getId() != "":
|
||||||
ContainerRegistry.getInstance().addContainer(profile)
|
container_registry.addContainer(profile)
|
||||||
else:
|
else:
|
||||||
self._configureProfile(profile, name_seed)
|
self._configureProfile(profile, name_seed)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue