Switch between correct states of the un-/installed buttons

Contributes to CURA-8587
This commit is contained in:
Jelle Spijker 2021-12-15 17:51:38 +01:00
parent 0ffaafc8c0
commit 23cc7084c4
No known key found for this signature in database
GPG key ID: 6662DC033BE6B99A
3 changed files with 12 additions and 6 deletions

View file

@ -19,7 +19,7 @@ from cura.CuraPackageManager import CuraPackageManager
from cura.UltimakerCloud.UltimakerCloudScope import UltimakerCloudScope # To make requests to the Ultimaker API with correct authorization.
from .PackageModel import PackageModel
from .Constants import USER_PACKAGES_URL
from .Constants import USER_PACKAGES_URL, PACKAGES_URL
if TYPE_CHECKING:
from PyQt5.QtCore import QObject
@ -195,6 +195,9 @@ class PackageList(ListModel):
:param update: A flag if this is download request is an update process
"""
if url == "":
url = f"{PACKAGES_URL}/{package_id}/download"
def downloadFinished(reply: "QNetworkReply") -> None:
self._downloadFinished(package_id, reply, update)