File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -512,15 +512,16 @@ void QgsVectorLayerProperties::apply()
512
512
QgsVectorLayer::EditType editType = ( QgsVectorLayer::EditType ) cb->itemData ( cb->currentIndex () ).toInt ();
513
513
layer->setEditType ( idx, editType );
514
514
515
+ QString value = tblAttributes->item ( i, 7 ) ? tblAttributes->item ( i, 7 )->text () : QString::null;
516
+
515
517
if ( editType == QgsVectorLayer::ValueMap )
516
518
{
517
519
QMap<QString, QVariant> &map = layer->valueMap ( idx );
518
520
map.clear ();
519
521
520
- QString value = tblAttributes->item ( i, 7 )->text ();
521
522
if ( !value.isEmpty () )
522
523
{
523
- QStringList values = tblAttributes-> item ( i, 7 )-> text () .split ( " ;" );
524
+ QStringList values = value .split ( " ;" );
524
525
for ( int j = 0 ; j < values.size (); j++ )
525
526
{
526
527
QStringList args = values[j].split ( " =" );
@@ -548,7 +549,7 @@ void QgsVectorLayerProperties::apply()
548
549
else if ( editType == QgsVectorLayer::EditRange ||
549
550
editType == QgsVectorLayer::SliderRange )
550
551
{
551
- QStringList values = tblAttributes-> item ( i, 7 )-> text () .split ( " ;" );
552
+ QStringList values = value .split ( " ;" );
552
553
553
554
if ( values.size () == 3 )
554
555
{
You can’t perform that action at this time.
0 commit comments