Skip to content

Commit

Permalink
ValueMap widget: show unmatched items in ()
Browse files Browse the repository at this point in the history
Fixes #32756
  • Loading branch information
elpaso committed May 28, 2020
1 parent 0496ce5 commit 6f9af58
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/gui/editorwidgets/qgsvaluemapwidgetwrapper.cpp
Expand Up @@ -78,5 +78,11 @@ void QgsValueMapWidgetWrapper::updateValues( const QVariant &value, const QVaria
v = value.toString();

if ( mComboBox )
{
if ( mComboBox->findData( v ) == -1 )
{
mComboBox->addItem( v.prepend( '(' ).append( ')' ), v );
}
mComboBox->setCurrentIndex( mComboBox->findData( v ) );
}
}

0 comments on commit 6f9af58

Please sign in to comment.