Skip to content

Commit

Permalink
apply r10263 to Version_1.0
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/branches/Version-1_0@10264 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef committed Mar 5, 2009
1 parent 6e676c1 commit 9384f60
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/app/qgsvectorlayerproperties.cpp
Expand Up @@ -512,15 +512,16 @@ void QgsVectorLayerProperties::apply()
QgsVectorLayer::EditType editType = ( QgsVectorLayer::EditType ) cb->itemData( cb->currentIndex() ).toInt();
layer->setEditType( idx, editType );

QString value = tblAttributes->item( i, 7 ) ? tblAttributes->item( i, 7 )->text() : QString::null;

if ( editType == QgsVectorLayer::ValueMap )
{
QMap<QString, QVariant> &map = layer->valueMap( idx );
map.clear();

QString value = tblAttributes->item( i, 7 )->text();
if ( !value.isEmpty() )
{
QStringList values = tblAttributes->item( i, 7 )->text().split( ";" );
QStringList values = value.split( ";" );
for ( int j = 0; j < values.size(); j++ )
{
QStringList args = values[j].split( "=" );
Expand Down Expand Up @@ -548,7 +549,7 @@ void QgsVectorLayerProperties::apply()
else if ( editType == QgsVectorLayer::EditRange ||
editType == QgsVectorLayer::SliderRange )
{
QStringList values = tblAttributes->item( i, 7 )->text().split( ";" );
QStringList values = value.split( ";" );

if ( values.size() == 3 )
{
Expand Down

0 comments on commit 9384f60

Please sign in to comment.