Skip to content

Commit

Permalink
fix #6253
Browse files Browse the repository at this point in the history
  • Loading branch information
jef-n committed Aug 27, 2012
1 parent 206e488 commit 078f5b8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/gui/qgsattributeeditor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -600,15 +600,16 @@ bool QgsAttributeEditor::retrieveValue( QWidget *widget, QgsVectorLayer *vl, int
if ( editType == QgsVectorLayer::ValueRelation )
{
text = '{';
for ( int i = 0; i < lw->count(); i++ )
for ( int i = 0, n = 0; i < lw->count(); i++ )
{
if ( lw->item( i )->checkState() == Qt::Checked )
{
if ( i > 0 )
if ( n > 0 )
{
text.append( ',' );
}
text.append( lw->item( i )->data( Qt::UserRole ).toString() );
n++;
}
}
text.append( '}' );
Expand Down

0 comments on commit 078f5b8

Please sign in to comment.