Désactive le plugin si la premier connection echou

This commit is contained in:
Tom LAVEILLE 2024-12-19 16:41:51 +01:00
parent a3cf4248cf
commit f59fac229e
2 changed files with 5 additions and 3 deletions

View File

@ -36,8 +36,6 @@ from .about_form import MetabaseAboutDialog
from PyQt5.QtCore import *
class PgMetadata:
def __init__(self):
""" Constructor. """

View File

@ -147,7 +147,11 @@ class CenRa_Metabase(QDockWidget, DOCK_CLASS):
#else:
self.default_html_content_not_pg_layer()
iface.layerTreeView().currentLayerChanged.connect(self.layer_changed)
try:
login_base()
iface.layerTreeView().currentLayerChanged.connect(self.layer_changed)
except:
self.default_html_content_not_pg_layer()
if iface.activeLayer():
layer=iface.activeLayer()