-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Open
Labels
BugEither a bug report, or a bug fix. Let's hope for the latter!Either a bug report, or a bug fix. Let's hope for the latter!FeedbackWaiting on the submitter for answersWaiting on the submitter for answers
Description
What is the bug or the crash?
In a memory layer, when features are added with lyr.dataProvider().addFeatures(ftrs) extent is not updated.
Steps to reproduce the issue
In a memory layer, when features are added with
lyr.dataProvider().truncate()
lyr.dataProvider().addFeatures(ftrs)
lyr.triggerRepaint()
they are rendered ok on map (provided map is zoomed appropriately). But, a call to
lyr.extent()
returns previous extent, e.g. on a new layer a (0 0, 0 0) extent.
A correctly updated extent is returned if you first either
- select the
lyrin Layers and click Zoom to Layer command, or - call
lyr.reload()
Versions
| QGIS version | 3.44.0-Solothurn |
| QGIS code revision | 5d9ba037df1 |
| Libraries | |
| Qt version | 5.15.13 |
| Python version | 3.12.11 |
| GDAL version | 3.11.0 (Compiled) 3.11.1 (Running) — Eganville |
| PROJ version | 9.6.2 |
| EPSG Registry database version | v12.013 (2025-05-26) |
| GEOS version | 3.13.1-CAPI-1.19.2 |
| SQLite version | 3.46.1 |
| PDAL version | 2.9.0 |
| PostgreSQL client version | 17.3 |
| SpatiaLite version | 5.1.0 |
| QWT version | 6.3.0 |
| QScintilla2 version | 2.14.1 |
| OS version | Windows 11 Version 2009 |
| Active Python plugins | |
| ONaNiNO-dev | #26bc963 on docked |
| plugin_reloader | 0.18 |
| db_manager | 0.1.20 |
| MetaSearch | 0.3.6 |
| processing | 2.12.99 |
Supported QGIS version
- I'm running a supported QGIS version according to the roadmap.
New profile
- I tried with a new QGIS profile
Additional context
No response
Metadata
Metadata
Assignees
Labels
BugEither a bug report, or a bug fix. Let's hope for the latter!Either a bug report, or a bug fix. Let's hope for the latter!FeedbackWaiting on the submitter for answersWaiting on the submitter for answers