Skip to content

Commit

Permalink
In installFromZipFile(), if plugin was active, no need to call startP…
Browse files Browse the repository at this point in the history
…lugin() before reloading it. This commit makes installFromZipFile() act like installPlugin().
  • Loading branch information
gacarrillor authored and nyalldawson committed Aug 24, 2021
1 parent 926a1b6 commit a31af8b
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions python/pyplugin_installer/installer.py
Expand Up @@ -655,10 +655,9 @@ def installFromZipFile(self, filePath):
plugins.getAllInstalled()
plugins.rebuild()

if settings.contains('/PythonPlugins/' + pluginName):
if settings.value('/PythonPlugins/' + pluginName, False, bool):
startPlugin(pluginName)
reloadPlugin(pluginName)
if settings.contains('/PythonPlugins/' + pluginName): # Plugin was available?
if settings.value('/PythonPlugins/' + pluginName, False, bool): # Plugin was also active?
reloadPlugin(pluginName) # unloadPlugin + loadPlugin + startPlugin
else:
unloadPlugin(pluginName)
loadPlugin(pluginName)
Expand Down

0 comments on commit a31af8b

Please sign in to comment.