Skip to content

Commit

Permalink
set edited features valid to prevent them from disappearing from screen
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk@10280 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
mhugent committed Mar 15, 2009
1 parent ebf7ac1 commit 2f700ce
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/core/qgsvectorlayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1261,6 +1261,7 @@ bool QgsVectorLayer::nextFeature( QgsFeature &f )
continue;

f.setFeatureId( fid );
f.setValid(true);

if ( mFetchGeometry )
f.setGeometry( mFetchChangedGeomIt.value() );
Expand Down Expand Up @@ -1318,6 +1319,7 @@ bool QgsVectorLayer::nextFeature( QgsFeature &f )
continue;

f.setFeatureId( fid );
f.setValid(true);

if ( mFetchGeometry )
f.setGeometry( *mFetchAddedFeaturesIt->geometry() );
Expand Down Expand Up @@ -1362,6 +1364,7 @@ bool QgsVectorLayer::featureAtId( int featureId, QgsFeature& f, bool fetchGeomet
if ( fetchGeometries && mChangedGeometries.contains( featureId ) )
{
f.setFeatureId( featureId );
f.setValid(true);
f.setGeometry( mChangedGeometries[featureId] );

if ( fetchAttributes )
Expand Down Expand Up @@ -1403,7 +1406,7 @@ bool QgsVectorLayer::featureAtId( int featureId, QgsFeature& f, bool fetchGeomet
if ( iter->id() == featureId )
{
f.setFeatureId( iter->id() );

f.setValid(true);
if ( fetchGeometries )
f.setGeometry( *iter->geometry() );

Expand Down

0 comments on commit 2f700ce

Please sign in to comment.