Skip to content
Permalink
Browse files

fix #3534

git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@15287 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef
jef committed Feb 28, 2011
1 parent 141d75c commit 842d19d676b2b15d5cd8864cf2a1f9e82a0f501e
Showing with 9 additions and 3 deletions.
  1. +9 −3 src/app/qgsattributetypedialog.cpp
@@ -542,13 +542,19 @@ void QgsAttributeTypeDialog::accept()
mValueMap.clear();
for ( int i = 0; i < tableWidget->rowCount() - 1; i++ )
{
if ( tableWidget->item( i, 1 )->text().isNull() )
QTableWidgetItem *ki = tableWidget->item( i, 0 );
QTableWidgetItem *vi = tableWidget->item( i, 1 );

if ( !ki )
continue;

if ( !vi || vi->text().isNull() )
{
mValueMap.insert( tableWidget->item( i, 0 )->text(), tableWidget->item( i, 0 )->text() );
mValueMap.insert( ki->text(), ki->text() );
}
else
{
mValueMap.insert( tableWidget->item( i, 1 )->text(), tableWidget->item( i, 0 )->text() );
mValueMap.insert( vi->text(), ki->text() );
}
}
mEditType = QgsVectorLayer::ValueMap;

0 comments on commit 842d19d

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