Skip to content
Permalink
Browse files

Editor widgets: Show NULL value on numeric line edit

  • Loading branch information
m-kuhn committed Sep 24, 2014
1 parent db6a5a9 commit 3f8a860503c78689c981234f874771f8b1277c97
Showing with 5 additions and 1 deletion.
  1. +5 −1 src/gui/editorwidgets/qgstexteditwrapper.cpp
@@ -95,7 +95,11 @@ void QgsTextEditWrapper::initWidget( QWidget* editor )
mLineEdit->setValidator( new QgsFieldValidator( mLineEdit, field() ) );

QgsFilterLineEdit *fle = qobject_cast<QgsFilterLineEdit*>( mLineEdit );
if ( fle && !( field().type() == QVariant::Int || field().type() == QVariant::Double || field().type() == QVariant::LongLong || field().type() == QVariant::Date ) )
if ( field().type() == QVariant::Int || field().type() == QVariant::Double || field().type() == QVariant::LongLong || field().type() == QVariant::Date )
{
mLineEdit->setPlaceholderText( QSettings().value( "qgis/nullValue", "NULL" ).toString() );
}
else if ( fle )
{
fle->setNullValue( QSettings().value( "qgis/nullValue", "NULL" ).toString() );
}

0 comments on commit 3f8a860

Please sign in to comment.
You can’t perform that action at this time.