Skip to content
Permalink
Browse files

[Plugin Installer] partially revert fd2b221 . Still QGIS restart is n…

…eeded after plugin update in some cases.
  • Loading branch information
borysiasty committed Jun 26, 2013
1 parent fe913a3 commit afbc9b840848764b6c83b43cc8b7cc2291095433
Showing with 3 additions and 2 deletions.
  1. +3 −2 python/pyplugin_installer/installer.py
@@ -319,13 +319,14 @@ def installPlugin(self, key, quiet=False):
settings = QSettings()
settings.setValue("/PythonPlugins/"+plugin["id"], True)
else:
infoString = (self.tr("Plugin reinstalled successfully"), self.tr("Plugin reinstalled successfully"))
settings = QSettings()
if settings.value("/PythonPlugins/"+key, False, type=bool):
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"), self.tr("Plugin reinstalled successfully"))
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()

0 comments on commit afbc9b8

Please sign in to comment.
You can’t perform that action at this time.