Skip to content
Permalink
Browse files

fix #1564

git-svn-id: http://svn.osgeo.org/qgis/trunk@10263 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef
jef committed Mar 5, 2009
1 parent 7371560 commit 86adf97cc7f0c1b915e68a7257b4135b417e1fa0
Showing with 4 additions and 3 deletions.
  1. +4 −3 src/app/qgsvectorlayerproperties.cpp
@@ -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( "=" );
@@ -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 )
{

0 comments on commit 86adf97

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