Skip to content

Commit

Permalink
#527 Display warning icon if the field is not found anymore in the layer
Browse files Browse the repository at this point in the history
  • Loading branch information
Gustry committed Nov 20, 2023
1 parent a05c0f8 commit 96fb007
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lizmap/table_manager/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 96fb007

Please sign in to comment.