Skip to content

Commit

Permalink
Merge pull request #597 from opengisch/QF-4527-big-feedback
Browse files Browse the repository at this point in the history
Make sure the dialog buttons are still clickable with long feedback
  • Loading branch information
suricactus authored Jul 15, 2024
2 parents bf7e59f + d9c6127 commit ff6fa8f
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions qfieldsync/gui/checker_feedback_table.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,15 @@ def __init__(self, checker_feedback: ProjectCheckerFeedback, *args, **kwargs):
self.setRowCount(0)
self.setMinimumHeight(100)

# When too much feedback, make sure the table does not force the buttons of the containing dialog to be below the screen edge.
try:
from qgis.utils import iface

max_height = int(iface.mapCanvas().size().height() / 3 * 2)
except Exception:
max_height = 400
self.setMaximumHeight(max_height)

for layer_id in checker_feedback.feedbacks.keys():
for feedback in checker_feedback.feedbacks[layer_id]:
row = self.rowCount()
Expand Down

0 comments on commit ff6fa8f

Please sign in to comment.