Skip to content
Permalink
Browse files

[Fix #7698] Attributetable crashes on close when valuemap is used

  • Loading branch information
m-kuhn committed May 13, 2013
1 parent 110b87e commit 142223b901af24d5c01f47aaed7a7caa09f9e340
Showing with 2 additions and 8 deletions.
  1. +2 −8 src/gui/attributetable/qgsattributetablemodel.cpp
@@ -58,13 +58,7 @@ QgsAttributeTableModel::QgsAttributeTableModel( QgsVectorLayerCache *layerCache,

QgsAttributeTableModel::~QgsAttributeTableModel()
{
const QMap<QString, QVariant> *item;
foreach ( item, mValueMaps )
{
delete item;
}

mValueMaps.clear();
qDeleteAll( mValueMaps );
}

bool QgsAttributeTableModel::loadFeatureAtId( QgsFeatureId fid ) const
@@ -201,7 +195,7 @@ void QgsAttributeTableModel::loadAttributes()
continue;

case QgsVectorLayer::ValueMap:
mValueMaps.insert( idx, &layer()->valueMap( idx ) );
mValueMaps.insert( idx, new QMap< QString, QVariant >( layer()->valueMap( idx ) ) );
break;

case QgsVectorLayer::ValueRelation:

0 comments on commit 142223b

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