We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
qgis
Learn more about funding links in repositories.
Report abuse
There was an error while loading. Please reload this page.
1 parent babab3d commit 616b4ddCopy full SHA for 616b4dd
src/core/qgsfeature.cpp
@@ -128,6 +128,7 @@ void QgsFeature::setId( QgsFeatureId id )
128
129
d.detach();
130
d->fid = id;
131
+ d->valid = true;
132
}
133
134
QgsAttributes QgsFeature::attributes() const
tests/src/python/test_qgsfeature.py
@@ -63,9 +63,8 @@ def test_Validity(self):
63
self.assertTrue(f.isValid())
64
f.setValid(False)
65
self.assertFalse(f.isValid())
66
-
67
- f.setValid(False)
68
- self.assertFalse(f.isValid())
+ f.setId(27)
+ self.assertTrue(f.isValid())
69
70
def test_Attributes(self):
71
myPath = os.path.join(unitTestDataPath(), 'lines.shp')
0 commit comments