Skip to content

Commit efc7921

Browse files
committedOct 28, 2014
Fix #11510 graduated renderer causes crash
1 parent d73c9d8 commit efc7921

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎src/core/symbology-ng/qgsgraduatedsymbolrendererv2.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -965,7 +965,7 @@ QList<double> QgsGraduatedSymbolRendererV2::getDataValues( QgsVectorLayer *vlaye
965965
else
966966
lst = expression->referencedColumns();
967967

968-
QgsFeatureIterator fit = vlayer->getFeatures( QgsFeatureRequest().setFlags( QgsFeatureRequest::NoGeometry ).setSubsetOfAttributes( lst, vlayer->pendingFields() ) );
968+
QgsFeatureIterator fit = vlayer->getFeatures( QgsFeatureRequest().setSubsetOfAttributes( lst, vlayer->pendingFields() ) );
969969

970970
// create list of non-null attribute values
971971
while ( fit.nextFeature( f ) )

4 commit comments

Comments
 (4)

nyalldawson commented on Oct 28, 2014

@nyalldawson
Collaborator

@elpaso Wouldn't it be better to check if the expression requires geometry (ie QgsExpression::needsGeometry), and only fetch it if required?

NathanW2 commented on Oct 28, 2014

@NathanW2
Member

elpaso commented on Oct 28, 2014

@elpaso
ContributorAuthor

Absolutely yes. I'll try that.

elpaso commented on Oct 28, 2014

@elpaso
ContributorAuthor

Like this ?

QgsFeatureIterator fit = vlayer->getFeatures( QgsFeatureRequest().setFlags( expression->needsGeometry() ? QgsFeatureRequest::NoFlags : QgsFeatureRequest::NoGeometry ).setSubsetOfAttributes( lst, vlayer->pendingFields() ) );

Please sign in to comment.