Skip to content

Commit

Permalink
Fix reading of multi selection ValueRelation widgets
Browse files Browse the repository at this point in the history
  • Loading branch information
m-kuhn committed Nov 22, 2017
1 parent 59cf9f3 commit b448826
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/gui/editorwidgets/qgsvaluerelationwidgetwrapper.cpp
Expand Up @@ -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 )
{
Expand Down

0 comments on commit b448826

Please sign in to comment.