mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-04-29 07:14:24 +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))
|
"packages": QUrl("{base_url}/packages".format(base_url = self._api_url))
|
||||||
}
|
}
|
||||||
|
|
||||||
@pyqtSlot()
|
# Request the latest and greatest!
|
||||||
def browsePackages(self) -> None:
|
self._fetchPackageData()
|
||||||
|
|
||||||
|
def _fetchPackageData(self):
|
||||||
# Create the network manager:
|
# Create the network manager:
|
||||||
# This was formerly its own function but really had no reason to be as
|
# This was formerly its own function but really had no reason to be as
|
||||||
# it was never called more than once ever.
|
# it was never called more than once ever.
|
||||||
@ -209,6 +211,10 @@ class Toolbox(QObject, Extension):
|
|||||||
# Gather installed packages:
|
# Gather installed packages:
|
||||||
self._updateInstalledModels()
|
self._updateInstalledModels()
|
||||||
|
|
||||||
|
@pyqtSlot()
|
||||||
|
def browsePackages(self) -> None:
|
||||||
|
self._fetchPackageData()
|
||||||
|
|
||||||
if not self._dialog:
|
if not self._dialog:
|
||||||
self._dialog = self._createDialog("Toolbox.qml")
|
self._dialog = self._createDialog("Toolbox.qml")
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user