diff options
author | j.delarago <joeydelarago@gmail.com> | 2022-06-08 13:19:36 +0300 |
---|---|---|
committer | j.delarago <joeydelarago@gmail.com> | 2022-06-08 13:19:36 +0300 |
commit | d5511a078c0f227828158a544560e0af8e9f2e0b (patch) | |
tree | 643e4e43e509af0bb1b5d8e15fa1c5e545f31a71 /plugins/Marketplace | |
parent | 25250a82051f6938b2467581292b6e29de17161f (diff) |
Dialog was immediately being destroyed because a reference to it was not being stored in memory. Added a missingPackageDialog variable to WorkspaceDialog to fix this.
Swapped the loading order of Marketplace extensions so SyncOrchestractor is not fetched by PluginRegistry.getInstance().getPluginObject("Marketplace") in WorkspaceDialog.
CURA-8610
Diffstat (limited to 'plugins/Marketplace')
-rw-r--r-- | plugins/Marketplace/Marketplace.py | 5 | ||||
-rw-r--r-- | plugins/Marketplace/__init__.py | 2 |
2 files changed, 4 insertions, 3 deletions
diff --git a/plugins/Marketplace/Marketplace.py b/plugins/Marketplace/Marketplace.py index 06fed6ec0b..b2c729c2cd 100644 --- a/plugins/Marketplace/Marketplace.py +++ b/plugins/Marketplace/Marketplace.py @@ -41,6 +41,7 @@ class Marketplace(Extension, QObject): self._tab_shown: int = 0 self._restart_needed = False + self.missingPackageDialog = None def getTabShown(self) -> int: return self._tab_shown @@ -128,5 +129,5 @@ class Marketplace(Extension, QObject): :param ignore_warning_callback: A callback that gets executed when the user ignores the pop-up, to show them a warning. """ - dialog = InstallMissingPackageDialog(packages_metadata, ignore_warning_callback) - dialog.show() + self.missingPackageDialog = InstallMissingPackageDialog(packages_metadata, ignore_warning_callback) + self.missingPackageDialog.show() diff --git a/plugins/Marketplace/__init__.py b/plugins/Marketplace/__init__.py index ef1beab33e..655cf6bf84 100644 --- a/plugins/Marketplace/__init__.py +++ b/plugins/Marketplace/__init__.py @@ -14,4 +14,4 @@ def register(app): """ Register the plug-in object with Uranium. """ - return { "extension": [Marketplace(), SyncOrchestrator(app)] } + return { "extension": [SyncOrchestrator(app), Marketplace()] } |