Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Backport release-3_34] Fix running plugins are not restarted after upgrading #56475

Merged
merged 2 commits into from
Feb 22, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions python/pyplugin_installer/installer.py
Original file line number Diff line number Diff line change
Expand Up @@ -361,14 +361,13 @@ def installPlugin(self, key, quiet=False, stable=True):
settings = QgsSettings()
settings.setValue("/PythonPlugins/" + plugin["id"], True)
else:
settings = QgsSettings()
if settings.value("/PythonPlugins/" + key, False, type=bool): # plugin will be reloaded on the fly only if currently loaded
reloadPlugin(key) # unloadPlugin + loadPlugin + startPlugin
infoString = (self.tr("Plugin reinstalled successfully"), "")
infoString = (self.tr("Plugin reinstalled successfully"), "")
if pluginWasLoaded:
loadPlugin(plugin["id"])
startPlugin(plugin["id"])
else:
unloadPlugin(key) # Just for a case. Will exit quietly if really not loaded
loadPlugin(key)
infoString = (self.tr("Plugin reinstalled successfully"), self.tr("Python plugin reinstalled.\nYou need to restart QGIS in order to reload it."))
if quiet:
infoString = (None, None)
QApplication.restoreOverrideCursor()
Expand Down
Loading