git-svn-id: http://svn.osgeo.org/qgis/trunk@10263 c8812cc2-4d05-0410-92ff-de0c093fc19c
This commit is contained in:
jef 2009-03-05 15:03:31 +00:00
parent 73715607eb
commit 86adf97cc7

View File

@ -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 )
{