From 96fb0079d7c47b7ff32506764ed7a139fcc0b65f Mon Sep 17 00:00:00 2001 From: Etienne Trimaille Date: Mon, 20 Nov 2023 10:07:40 +0100 Subject: [PATCH] #527 Display warning icon if the field is not found anymore in the layer --- lizmap/table_manager/base.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lizmap/table_manager/base.py b/lizmap/table_manager/base.py index 1b60f569..97044853 100755 --- a/lizmap/table_manager/base.py +++ b/lizmap/table_manager/base.py @@ -288,6 +288,12 @@ def _edit_row(self, row, data): index = self._layer.fields().indexFromName(value) if index >= 0: cell.setIcon(self._layer.fields().iconForField(index)) + else: + cell.setIcon(QIcon(":/images/themes/default/mIconWarning.svg")) + cell.setData(Qt.ToolTipRole, tr( + 'Field "{}" not found in the layer. You should check this configuration or fix your ' + 'fields.' + ).format(value)) elif input_type == InputType.Fields: cell.setText(value)