From d2a9d7d94d1d4ffb0b880693fcb8bb160ef7195d Mon Sep 17 00:00:00 2001 From: Remco Burema Date: Tue, 7 Dec 2021 16:02:54 +0100 Subject: [PATCH] Get 'already going to be installed' status in constructor. Otherwise this isn't saved, and the state of 'installed, but needs restart' (as shown in the package card) won't be known to the package card (buttons), resulting in an 'Install' button when tabs are switched. part of CURA-8587 --- plugins/Marketplace/PackageModel.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/Marketplace/PackageModel.py b/plugins/Marketplace/PackageModel.py index 4e7fce5ce4..ed64a85c04 100644 --- a/plugins/Marketplace/PackageModel.py +++ b/plugins/Marketplace/PackageModel.py @@ -7,6 +7,7 @@ from typing import Any, Dict, List, Optional from PyQt5.QtCore import pyqtProperty, QObject, pyqtSignal +from cura.CuraApplication import CuraApplication from cura.Settings.CuraContainerRegistry import CuraContainerRegistry # To get names of materials we're compatible with. from UM.i18n import i18nCatalog # To translate placeholder names if data is not present. @@ -69,7 +70,7 @@ class PackageModel(QObject): self._icon_url = author_data.get("icon_url", "") self._is_installing: ManageState = ManageState.HALTED - self._is_recently_installed = False + self._is_recently_installed = self._package_id in CuraApplication.getInstance().getPackageManager().getPackagesToInstall() self._is_recently_updated = False self._is_recently_enabled = False