From 69b90b43ce64cba75235c74b19c50acb5378fc68 Mon Sep 17 00:00:00 2001 From: Andrea Giudiceandrea Date: Fri, 28 Feb 2025 08:04:12 +0100 Subject: [PATCH] Fix Value Map widget with NULL value and field length < 38 --- src/gui/editorwidgets/qgsvaluemapconfigdlg.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/gui/editorwidgets/qgsvaluemapconfigdlg.cpp b/src/gui/editorwidgets/qgsvaluemapconfigdlg.cpp index 8d6c1ae5b4b5..e3ce3671b7d0 100644 --- a/src/gui/editorwidgets/qgsvaluemapconfigdlg.cpp +++ b/src/gui/editorwidgets/qgsvaluemapconfigdlg.cpp @@ -246,6 +246,11 @@ void QgsValueMapConfigDlg::updateMap( const QList> &lis QString QgsValueMapConfigDlg::checkValueLength( const QString &value ) { + if ( value == QgsValueMapFieldFormatter::NULL_VALUE ) + { + return value; + } + if ( layer()->fields().exists( field() ) ) { const QgsField mappedField { layer()->fields().field( field() ) };