Skip to content
Permalink
Browse files

fix #3534

git-svn-id: http://svn.osgeo.org/qgis/trunk@15287 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef
jef committed Feb 28, 2011
1 parent 9bbbae6 commit c39528109f20966c63d15a4a923a2ed1fcb0ef04
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 c395281

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