Skip to content

Commit 3f8a860

Browse files
committed
Editor widgets: Show NULL value on numeric line edit
1 parent db6a5a9 commit 3f8a860

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/gui/editorwidgets/qgstexteditwrapper.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,11 @@ void QgsTextEditWrapper::initWidget( QWidget* editor )
9595
mLineEdit->setValidator( new QgsFieldValidator( mLineEdit, field() ) );
9696

9797
QgsFilterLineEdit *fle = qobject_cast<QgsFilterLineEdit*>( mLineEdit );
98-
if ( fle && !( field().type() == QVariant::Int || field().type() == QVariant::Double || field().type() == QVariant::LongLong || field().type() == QVariant::Date ) )
98+
if ( field().type() == QVariant::Int || field().type() == QVariant::Double || field().type() == QVariant::LongLong || field().type() == QVariant::Date )
99+
{
100+
mLineEdit->setPlaceholderText( QSettings().value( "qgis/nullValue", "NULL" ).toString() );
101+
}
102+
else if ( fle )
99103
{
100104
fle->setNullValue( QSettings().value( "qgis/nullValue", "NULL" ).toString() );
101105
}

0 commit comments

Comments
 (0)