We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 59cf9f3 commit b448826Copy full SHA for b448826
src/gui/editorwidgets/qgsvaluerelationwidgetwrapper.cpp
@@ -149,7 +149,11 @@ void QgsValueRelationWidgetWrapper::setValue( const QVariant &value )
149
{
150
if ( mListWidget )
151
152
- QStringList checkList = value.toString().remove( QChar( '{' ) ).remove( QChar( '}' ) ).split( ',' );
+ QStringList checkList;
153
+ if ( value.type() == QVariant::StringList )
154
+ checkList = value.toStringList();
155
+ else if ( value.type() == QVariant::String )
156
+ checkList = value.toString().remove( QChar( '{' ) ).remove( QChar( '}' ) ).split( ',' );
157
158
for ( int i = 0; i < mListWidget->count(); ++i )
159
0 commit comments