mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-04-28 23:04:34 +08:00
Detach the data request and the showing of the dialog from eachother.
This way we can fetch the data without having to show the marketplace. CURA-6151
This commit is contained in:
parent
9a5b7e7925
commit
fd015c0381
@ -190,8 +190,10 @@ class Toolbox(QObject, Extension):
|
||||
"packages": QUrl("{base_url}/packages".format(base_url = self._api_url))
|
||||
}
|
||||
|
||||
@pyqtSlot()
|
||||
def browsePackages(self) -> None:
|
||||
# Request the latest and greatest!
|
||||
self._fetchPackageData()
|
||||
|
||||
def _fetchPackageData(self):
|
||||
# Create the network manager:
|
||||
# This was formerly its own function but really had no reason to be as
|
||||
# it was never called more than once ever.
|
||||
@ -209,6 +211,10 @@ class Toolbox(QObject, Extension):
|
||||
# Gather installed packages:
|
||||
self._updateInstalledModels()
|
||||
|
||||
@pyqtSlot()
|
||||
def browsePackages(self) -> None:
|
||||
self._fetchPackageData()
|
||||
|
||||
if not self._dialog:
|
||||
self._dialog = self._createDialog("Toolbox.qml")
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user