Bug report #1572
new features will not display before spatial index is recreated/QGIS restarted
|Affected QGIS version:||Regression?:||No|
|Operating System:||All||Easy fix?:||No|
|Pull Request or Patch supplied:||Resolution:||fixed|
|Crashes QGIS or corrupts data:||Copied to github as #:||11632|
I've imported some shapefile-exports (Geomedia) and added line-features in QGIS. The lines were showing up nicely, until I hit "Toggle editing" and "save". After saving, the features immediately disappeared. I saved everything, restarted QGIS, still not there. (Features were showing up in the table though). I restarted QGIS again, still no sign. I've tried theo whole thing again, drawing new features, and again: as soon as I saved the edits, they would disappear. I hit "create spatial index" and boom: immediately all those features get displayed.
#4 Updated by paull - over 11 years ago
Theres a second funny thing that I think is related to this bug.
- Layer A and Layer B both use the same shape-file to display features of that shape-file (in my case: Points)
- I add points (working with Layer A); The new points are being drawn on the map in Layer A; They disappear as soon as I save the changes to the shapefile and reappear as soon as I rebuild the index (see description above). However: The new points never appear on Layer B throughout the process, even though this layer references the same Shapefile as Layer A.
- It takes a complete Restart of QGIS to have Layer B display the newly added points as well. Zooming, panning, disabling and reenabling all doesn't work; the only way to force Layer B to refresh seems to be a restart of QGIS.
#6 Updated by Marco Hugentobler over 11 years ago
- Resolution set to fixed
- Status changed from Open to Closed
Fixed in e00cfa7b (SVN r11226). The spatial index is now recreated if geometry changes are commited. Note that there is work in progress in the OGR library related to a more efficient update of the spatial index.