Addon Manager: Show correct buttons when no git

If git and/or GitPython are not installed, the Addon Manager cannot
check to see if there are any available updates. In that case, show
the "Uninstall" and "Update" buttons. If no update is available,
clicking the update button will simply download a new copy of the
addon.
This commit is contained in:
Chris Hennes
2022-02-23 17:00:02 -06:00
parent fb35944604
commit a3d8a0e635

View File

@@ -331,6 +331,11 @@ class PackageDetails(QWidget):
self.ui.buttonUninstall.show()
self.ui.buttonUpdate.hide()
self.ui.buttonCheckForUpdate.hide()
elif status == AddonManagerRepo.UpdateStatus.CANNOT_CHECK:
self.ui.buttonInstall.hide()
self.ui.buttonUninstall.show()
self.ui.buttonUpdate.show()
self.ui.buttonCheckForUpdate.hide()
required_version = self.requires_newer_freecad()
if repo.obsolete: