mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-13 21:56:04 +08:00
Fix checkbox for automatic plug-in update checking
The checkbox was still there in the preferences page, but it didn't work at all, for two reasons: - The preference entry didn't exist. This was causing warnings in the log (which is why I saw it). - It wasn't checking the preference before making that API call. Could make a bunch of people pretty angry.
This commit is contained in:
parent
d778b539c2
commit
25e914b1cb
@ -31,8 +31,11 @@ class Marketplace(Extension, QObject):
|
||||
# Not entirely the cleanest code, since the localPackage list also checks the server if there are updates
|
||||
# Since that in turn will trigger notifications to be shown, we do need to construct it here and make sure
|
||||
# that it checks for updates...
|
||||
preferences = CuraApplication.getInstance().getPreferences()
|
||||
preferences.addPreference("info/automatic_plugin_update_check", True)
|
||||
self._local_package_list = LocalPackageList(self)
|
||||
self._local_package_list.checkForUpdates(self._package_manager.local_packages)
|
||||
if preferences.getValue("info/automatic_plugin_update_check"):
|
||||
self._local_package_list.checkForUpdates(self._package_manager.local_packages)
|
||||
|
||||
self._package_manager.installedPackagesChanged.connect(self.checkIfRestartNeeded)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user