Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
[API] Backport some nice PyQGIS API for working with geometry collect…
…ions - Calling removeGeometry with an invalid index will now raise an IndexError - Calling collection[0] will return the first geometry in the collection, collection[1] the second, etc. And negative indices return from the end of the collection, so collection[-1] returns the last geometry in the collection. - Geometries can be deleted by calling `del collection[1]` (deletes the second geometry from the collection). Also supports negative indices to count from the end of the collection. (cherry picked from commit 4bba8ae)
- Loading branch information
Showing
with
207 additions
and 2 deletions.