disable plugin avec 'qgis.utils.plugins[#]'
This commit is contained in:
parent
50902b8664
commit
1c6eaa82be
@ -191,13 +191,14 @@ class PgMetadata:
|
||||
iface.deregisterLocatorFilter(self.locator_filter)
|
||||
del self.locator_filter
|
||||
|
||||
if self.help_action:
|
||||
iface.pluginHelpMenu().removeAction(self.help_action)
|
||||
del self.help_action
|
||||
|
||||
if self.dock_action:
|
||||
iface.pluginMenu().removeAction(self.dock_action)
|
||||
del self.dock_action
|
||||
|
||||
if self.help_action:
|
||||
iface.pluginHelpMenu().removeAction(self.help_action)
|
||||
del self.help_action
|
||||
|
||||
@staticmethod
|
||||
def run_tests(pattern='test_*.py', package=None):
|
||||
|
||||
@ -39,6 +39,7 @@ from qgis.PyQt.QtWidgets import (
|
||||
)
|
||||
from qgis.gui import *
|
||||
from qgis.utils import iface
|
||||
import qgis
|
||||
'''
|
||||
from pg_metadata.connection_manager import (
|
||||
check_pgmetadata_is_installed,
|
||||
@ -151,7 +152,9 @@ class CenRa_Metabase(QDockWidget, DOCK_CLASS):
|
||||
login_base()
|
||||
iface.layerTreeView().currentLayerChanged.connect(self.layer_changed)
|
||||
except:
|
||||
self.default_html_content_not_pg_layer()
|
||||
#qgis.utils.plugins['CenRa_METABASE'].initGui()
|
||||
qgis.utils.plugins['CenRa_METABASE'].unload()
|
||||
#self.default_html_content_not_pg_layer()
|
||||
|
||||
if iface.activeLayer():
|
||||
layer=iface.activeLayer()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user