File tree Expand file tree Collapse file tree 3 files changed +14
-1
lines changed Expand file tree Collapse file tree 3 files changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -372,6 +372,18 @@ class QgsVectorLayer : QgsMapLayer
372
372
*/
373
373
QgsFeatureList selectedFeatures();
374
374
375
+ /**
376
+ * Get an iterator of the selected features
377
+ *
378
+ * @param request You may specify a request, e.g. to limit the set of requested attributes.
379
+ * Any filter on the request will be discarded.
380
+ *
381
+ * @return Iterator over the selected features
382
+ *
383
+ * @see selectedFeaturesIds()
384
+ */
385
+ QgsFeatureIterator selectedFeaturesIterator( QgsFeatureRequest request = QgsFeatureRequest() );
386
+
375
387
/**
376
388
* Return reference to identifiers of selected features
377
389
*
Original file line number Diff line number Diff line change @@ -2296,7 +2296,6 @@ const QgsFeatureIds& QgsVectorLayer::selectedFeaturesIds() const
2296
2296
return mSelectedFeatureIds ;
2297
2297
}
2298
2298
2299
-
2300
2299
QgsFeatureList QgsVectorLayer::selectedFeatures ()
2301
2300
{
2302
2301
QgsFeatureList features;
Original file line number Diff line number Diff line change @@ -731,6 +731,7 @@ class CORE_EXPORT QgsVectorLayer : public QgsMapLayer
731
731
* @return A list of { @link QgsFeature } 's
732
732
*
733
733
* @see selectedFeaturesIds()
734
+ * @see selectedFeaturesIterator() which is more memory friendly when handling large selections
734
735
*/
735
736
QgsFeatureList selectedFeatures ();
736
737
@@ -743,6 +744,7 @@ class CORE_EXPORT QgsVectorLayer : public QgsMapLayer
743
744
* @return Iterator over the selected features
744
745
*
745
746
* @see selectedFeaturesIds()
747
+ * @see selectedFeatures()
746
748
*/
747
749
QgsFeatureIterator selectedFeaturesIterator ( QgsFeatureRequest request = QgsFeatureRequest() );
748
750
You can’t perform that action at this time.
0 commit comments