Skip to content

Commit

Permalink
Merge pull request #3289 from dgoedkoop/valuemapsearchnull
Browse files Browse the repository at this point in the history
Add handling of null value in value map to search widget
  • Loading branch information
nyalldawson committed Sep 5, 2016
2 parents 6dbdd4c + 5f39455 commit 1819b31
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/gui/editorwidgets/qgsvaluemapsearchwidgetwrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

#include "qgsvaluemapsearchwidgetwrapper.h"
#include "qgstexteditconfigdlg.h"
#include "qgsvaluemapconfigdlg.h"

#include "qgsfield.h"
#include "qgsfieldvalidator.h"
Expand Down Expand Up @@ -145,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 ) ) );
Expand Down

0 comments on commit 1819b31

Please sign in to comment.