Skip to content

Commit

Permalink
Merge pull request #806 from opengisch/validateSetCurrentLayerIfVisible
Browse files Browse the repository at this point in the history
Set current layer only if validate dock is visible
  • Loading branch information
signedav authored May 17, 2023
2 parents 26fcde3 + 5238d4a commit b094f9b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions QgisModelBaker/gui/validate.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit b094f9b

Please sign in to comment.