Skip to content

Commit 512b99c

Browse files
author
wonder
committed
fix for a regression - QgsVectorLayer::featureAtId returns empty attribute map if not in editing mode
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@9851 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent e49fd9c commit 512b99c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/core/qgsvectorlayer.cpp

+4
Original file line numberDiff line numberDiff line change
@@ -1154,6 +1154,10 @@ void QgsVectorLayer::setSubsetString( QString subset )
11541154

11551155
void QgsVectorLayer::updateFeatureAttributes( QgsFeature &f )
11561156
{
1157+
// do not update when we aren't in editing mode
1158+
if ( ! mEditable )
1159+
return;
1160+
11571161
if ( mChangedAttributeValues.contains( f.id() ) )
11581162
{
11591163
const QgsAttributeMap &map = mChangedAttributeValues[f.id()];

0 commit comments

Comments
 (0)