Skip to content
Permalink
Browse files

Change to just not display null choice in search widget value list

  • Loading branch information
dgoedkoop committed Jul 11, 2016
1 parent 6b904e7 commit 5f394550de1111ea037ad253fef7dfe25efd4b36
Showing with 2 additions and 7 deletions.
  1. +2 −7 src/gui/editorwidgets/qgsvaluemapsearchwidgetwrapper.cpp
@@ -96,12 +96,6 @@ QString QgsValueMapSearchWidgetWrapper::createExpression( QgsSearchWidgetWrapper

QString currentKey = mComboBox->itemData( mComboBox->currentIndex() ).toString();

if ( currentKey == QString( VALUEMAP_NULL_TEXT ) )
if ( flags & EqualTo )
return fieldName + " IS NULL";
if ( flags & NotEqualTo )
return fieldName + " IS NOT NULL";

switch ( fldType )
{
case QVariant::Int:
@@ -152,7 +146,8 @@ void QgsValueMapSearchWidgetWrapper::initWidget( QWidget* editor )

while ( it != cfg.constEnd() )
{
mComboBox->addItem( it.key(), it.value() );
if ( it.value() != QString( VALUEMAP_NULL_TEXT ) )
mComboBox->addItem( it.key(), it.value() );
++it;
}
connect( mComboBox, SIGNAL( currentIndexChanged( int ) ), this, SLOT( comboBoxIndexChanged( int ) ) );

0 comments on commit 5f39455

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