Skip to content
Permalink
Browse files

editor widgets: restore initialization of null numeric values and dat…

…es in text edit widget (followup e605ad6; fixes #10326)
  • Loading branch information
jef-n committed Jun 9, 2014
1 parent 7b9fc8f commit dc447472279eda4c5efaba05a9d98606da340191
Showing with 3 additions and 2 deletions.
  1. +3 −2 src/gui/editorwidgets/qgstexteditwidget.cpp
@@ -107,9 +107,10 @@ void QgsTextEditWidget::initWidget( QWidget* editor )
void QgsTextEditWidget::setValue( const QVariant& value )
{
QString v;
if ( value.isNull() && !( field().type() == QVariant::Int || field().type() == QVariant::Double || field().type() == QVariant::LongLong || field().type() == QVariant::Date ) )
if ( value.isNull() )
{
v = QSettings().value( "qgis/nullValue", "NULL" ).toString();
if ( !( field().type() == QVariant::Int || field().type() == QVariant::Double || field().type() == QVariant::LongLong || field().type() == QVariant::Date ) )
v = QSettings().value( "qgis/nullValue", "NULL" ).toString();
}
else
v = value.toString();

0 comments on commit dc44747

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