Skip to content

Commit

Permalink
Merge pull request #801 from opengisch/fixfixthebox
Browse files Browse the repository at this point in the history
Fix broken export models gui on validator.
  • Loading branch information
signedav authored Apr 14, 2023
2 parents 44eae35 + 5da6081 commit 60ed99e
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions QgisModelBaker/gui/panel/export_models_panel.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,18 @@ def __init__(self, parent=None):
self.setupUi(self)
self.parent = parent

def setup_dialog(self, validation=False):
self._generate_texts(validation)
self.export_models_checkbox.setChecked(False)
self.items_view.setVisible(False)

if self.parent:
try:
self.items_view.clicked.disconnect()
self.items_view.space_pressed.disconnect()
except Exception:
pass

self.items_view.setModel(self.parent.current_export_models_model)
self.items_view.clicked.connect(self.items_view.model().check)
self.items_view.space_pressed.connect(self.items_view.model().check)
Expand All @@ -42,11 +53,6 @@ def __init__(self, parent=None):
self.export_models_checkbox.stateChanged.connect(self._active_state_changed)
self._active_state_changed(self.parent.current_export_models_active)

def setup_dialog(self, validation=False):
self._generate_texts(validation)
self.export_models_checkbox.setChecked(False)
self.items_view.setVisible(False)

def _generate_texts(self, validation):
self.export_models_checkbox.setText(
self.tr(
Expand Down

0 comments on commit 60ed99e

Please sign in to comment.