Skip to content
Permalink
Browse files

Fix reading of multi selection ValueRelation widgets

  • Loading branch information
m-kuhn committed Nov 22, 2017
1 parent 59cf9f3 commit b448826d5b1bfc10e6df15f672617ca3ba7d1bba
Showing with 5 additions and 1 deletion.
  1. +5 −1 src/gui/editorwidgets/qgsvaluerelationwidgetwrapper.cpp
@@ -149,7 +149,11 @@ void QgsValueRelationWidgetWrapper::setValue( const QVariant &value )
{
if ( mListWidget )
{
QStringList checkList = value.toString().remove( QChar( '{' ) ).remove( QChar( '}' ) ).split( ',' );
QStringList checkList;
if ( value.type() == QVariant::StringList )
checkList = value.toStringList();
else if ( value.type() == QVariant::String )
checkList = value.toString().remove( QChar( '{' ) ).remove( QChar( '}' ) ).split( ',' );

for ( int i = 0; i < mListWidget->count(); ++i )
{

0 comments on commit b448826

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