From f18ee02ecd6db5eec8e7e5b75ce369ede654840a Mon Sep 17 00:00:00 2001 From: yann300 Date: Mon, 23 Jul 2018 15:04:03 +0200 Subject: [PATCH] don't load plugin if loaded --- src/app/panels/righthand-panel.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/app/panels/righthand-panel.js b/src/app/panels/righthand-panel.js index 745535ec0e..dd07ceecdf 100644 --- a/src/app/panels/righthand-panel.js +++ b/src/app/panels/righthand-panel.js @@ -76,8 +76,13 @@ module.exports = class RighthandPanel { }) self.event.register('plugin-name-loadRequest', name => { - if (plugins[name]) { - self.loadPlugin(plugins[name]) + var plugin = plugins[name] + if (plugin) { + if (!self._components.pluginManager.plugins[plugin.title]) { + self.loadPlugin(plugin) + } else { + toolTip(name + ' already loaded') + } } else { toolTip('unknown plugin ' + name) }