Skip to content


[Plugin Installer] Simplify plugin reloading
Browse files Browse the repository at this point in the history
  • Loading branch information
borysiasty committed Jun 25, 2013
1 parent 6cfe4a5 commit fd2b221
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions python/pyplugin_installer/
Expand Up @@ -320,11 +320,13 @@ def installPlugin(self, key, quiet=False):
settings = QSettings()
settings.setValue("/PythonPlugins/"+plugin["id"], True)
infoString = ("Plugin reinstalled successfully"),"Plugin reinstalled successfully"))
settings = QSettings()
if settings.value("/PythonPlugins/"+key, False, type=bool): # plugin will be reloaded on the fly only if currently loaded
infoString = ("Plugin reinstalled successfully"),"Plugin reinstalled successfully"))
else: infoString = ("Plugin reinstalled successfully"),"Python plugin reinstalled.\nYou need to restart QGIS in order to reload it."))
if settings.value("/PythonPlugins/"+key, False, type=bool):
reloadPlugin(key) # unloadPlugin + loadPlugin + startPlugin
unloadPlugin(key) # Just for a case. Will exit quietly if really not loaded
if quiet:
infoString = (None, None)
Expand Down

0 comments on commit fd2b221

Please sign in to comment.