Commit efc7921
1 file changed
+1
-1
lines changedLines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
965 | 965 |
| |
966 | 966 |
| |
967 | 967 |
| |
968 |
| - | |
| 968 | + | |
969 | 969 |
| |
970 | 970 |
| |
971 | 971 |
| |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
965 | 965 |
| |
966 | 966 |
| |
967 | 967 |
| |
968 |
| - | |
| 968 | + | |
969 | 969 |
| |
970 | 970 |
| |
971 | 971 |
| |
|
4 commit comments
nyalldawson commentedon Oct 28, 2014
@elpaso Wouldn't it be better to check if the expression requires geometry (ie QgsExpression::needsGeometry), and only fetch it if required?
NathanW2 commentedon Oct 28, 2014
elpaso commentedon Oct 28, 2014
Absolutely yes. I'll try that.
elpaso commentedon Oct 28, 2014
Like this ?
QgsFeatureIterator fit = vlayer->getFeatures( QgsFeatureRequest().setFlags( expression->needsGeometry() ? QgsFeatureRequest::NoFlags : QgsFeatureRequest::NoGeometry ).setSubsetOfAttributes( lst, vlayer->pendingFields() ) );