Skip to content

Commit

Permalink
[Plugin Installer] partially revert fd2b221 . Still QGIS restart is n…
Browse files Browse the repository at this point in the history
…eeded after plugin update in some cases.
  • Loading branch information
borysiasty committed Jun 26, 2013
1 parent fe913a3 commit afbc9b8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions python/pyplugin_installer/installer.py
Expand Up @@ -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()
Expand Down

0 comments on commit afbc9b8

Please sign in to comment.