From d9c61271a8521f85b255fb0d95a66acf85a5b296 Mon Sep 17 00:00:00 2001 From: Ivan Ivanov Date: Tue, 9 Jul 2024 23:28:43 +0300 Subject: [PATCH] Make sure the dialog buttons are still clickable with long feedback --- qfieldsync/gui/checker_feedback_table.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/qfieldsync/gui/checker_feedback_table.py b/qfieldsync/gui/checker_feedback_table.py index 6fefd770..27689b50 100644 --- a/qfieldsync/gui/checker_feedback_table.py +++ b/qfieldsync/gui/checker_feedback_table.py @@ -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()