diff --git a/QgisModelBaker/gui/validate.py b/QgisModelBaker/gui/validate.py index 45f73d1b9..058102586 100644 --- a/QgisModelBaker/gui/validate.py +++ b/QgisModelBaker/gui/validate.py @@ -192,6 +192,9 @@ def _reset_gui(self): self.setDisabled(True) def set_current_layer(self, layer): + if self.isHidden(): + return + if not layer or not layer.dataProvider() or not layer.dataProvider().isValid(): self.setDisabled(True) return