Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Ultimaker/Cura.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDiego Prado Gesto <d.pradogesto@ultimaker.com>2018-05-11 09:42:03 +0300
committerDiego Prado Gesto <d.pradogesto@ultimaker.com>2018-05-11 09:50:42 +0300
commit43657010bae9de322b1d1b8a28df1714d10a54da (patch)
tree390367b02eff97cccb49329381f8fa901e42d218 /plugins/3MFWriter
parent42ecb126145eddebe0ebe7f5ae5ea303ef40ac05 (diff)
CURA-5164 The Preferences is not a singleton class anymore since in some point
several instances need to be created. - In the ThreeMFWorkspaceReader we need to create some temporal instances of Preferences that makes it not singleton anymore. - The current preferences are kept in the Application class and so all the calls to the preferences are changed to get the preferences from Application. - The method getInstance in Preferences is kept as deprecated since some external plugins.
Diffstat (limited to 'plugins/3MFWriter')
-rw-r--r--plugins/3MFWriter/ThreeMFWorkspaceWriter.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/3MFWriter/ThreeMFWorkspaceWriter.py b/plugins/3MFWriter/ThreeMFWorkspaceWriter.py
index e948f62337..33df0bfe90 100644
--- a/plugins/3MFWriter/ThreeMFWorkspaceWriter.py
+++ b/plugins/3MFWriter/ThreeMFWorkspaceWriter.py
@@ -51,7 +51,7 @@ class ThreeMFWorkspaceWriter(WorkspaceWriter):
self._writeContainerToArchive(container, archive)
# Write preferences to archive
- original_preferences = Preferences.getInstance() #Copy only the preferences that we use to the workspace.
+ original_preferences = Application.getInstance().getPreferences() #Copy only the preferences that we use to the workspace.
temp_preferences = Preferences()
for preference in {"general/visible_settings", "cura/active_mode", "cura/categories_expanded"}:
temp_preferences.addPreference(preference, None)