Disable other buttons while toolbox is downloading to avoid crashes.

I did it that way to not be risky because we're close to the release.

Contributes to CURA-5778.
This commit is contained in:
Diego Prado Gesto 2018-10-01 17:21:34 +02:00
parent a6e98f344e
commit 77fd05ac70
5 changed files with 10 additions and 8 deletions

View file

@ -603,7 +603,7 @@ class Toolbox(QObject, Extension):
@pyqtSlot()
def cancelDownload(self) -> None:
Logger.log("i", "Toolbox: User cancelled the download of a plugin.")
Logger.log("i", "Toolbox: User cancelled the download of a package.")
self.resetDownload()
def resetDownload(self) -> None:
@ -755,6 +755,7 @@ class Toolbox(QObject, Extension):
self._active_package = package
self.activePackageChanged.emit()
## The active package is the package that is currently being downloaded
@pyqtProperty(QObject, fset = setActivePackage, notify = activePackageChanged)
def activePackage(self) -> Optional[Dict[str, Any]]:
return self._active_package