Skip to content
Permalink
Browse files
Set feature valid on setId
  • Loading branch information
m-kuhn committed Mar 18, 2017
1 parent babab3d commit 616b4dd9879b5839ea92ca76d5dbbd2682329a7d
Showing with 3 additions and 3 deletions.
  1. +1 −0 src/core/qgsfeature.cpp
  2. +2 −3 tests/src/python/test_qgsfeature.py
@@ -128,6 +128,7 @@ void QgsFeature::setId( QgsFeatureId id )

d.detach();
d->fid = id;
d->valid = true;
}

QgsAttributes QgsFeature::attributes() const
@@ -63,9 +63,8 @@ def test_Validity(self):
self.assertTrue(f.isValid())
f.setValid(False)
self.assertFalse(f.isValid())

f.setValid(False)
self.assertFalse(f.isValid())
f.setId(27)
self.assertTrue(f.isValid())

def test_Attributes(self):
myPath = os.path.join(unitTestDataPath(), 'lines.shp')

0 comments on commit 616b4dd

Please sign in to comment.