Bug report #8317

Deleted features are not really deleted.

Added by Minoru Akagi about 11 years ago. Updated about 11 years ago.

Status:Closed
Priority:Normal
Assignee:-
Category:Data Provider
Affected QGIS version:master Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:No Copied to github as #:17110

Description

When I save changes of editting to a shapefile after deleting some features, the deleted feature records have not been really deleted from the shapefile. They are just marked as deleted. With 1.8, they are really deleted. Related to 810c11b.


Related issues

Related to QGIS Application - Bug report #7472: vector editing errors Closed 2013-03-29
Related to QGIS Application - Bug report #8822: OGR: Repack in running session Closed 2013-10-11
Related to QGIS Application - Bug report #11007: Deleted/edited features within SHAPEFILE are still recogn... Closed 2014-08-05
Related to QGIS Application - Bug report #11296: Deleting shapes in shapefiles does not work Closed 2014-09-30

Associated revisions

Revision 6149d34a
Added by Jürgen Fischer about 11 years ago

run REPACK after deleting features (fixes #8317)

Revision cf7e016b
Added by Jürgen Fischer over 10 years ago

ogr: don't create spatial index for shapes after deletes. That was supposed to
also run a repack and doesn't work without (fixes #10483, refs #8317, refs #8822)

Revision 7d7cdcd3
Added by Matthias Kuhn over 9 years ago

Repack shapefiles when saving after deleting features

  • QgsVectorDataProvider::dataChanged() will be emitted
  • QgsVectorLayer::dataChanged() will be emitted
  • Clears QgsVectorLayerCache
  • Reloads the attribute table
  • Clears the selection

Looking forward to people complaining about their lost selection...

Fix #10560
Fix #11989
Refs #8317
Refs #8822
Refs #10483
Refs #11007
Refs #7540
Refs #11398
Refs #11296

History

#1 Updated by Jürgen Fischer about 11 years ago

  • Priority changed from Severe/Regression to Normal

you should create a spatialindex once in a while - that will also repack it.

#2 Updated by Minoru Akagi about 11 years ago

Users who don't know it will be confused when they move the data to another GIS software. What about doing REPACK in the destructor of QgsOgrProvider, only if any features have been deleted?

#3 Updated by Jürgen Fischer about 11 years ago

  • Status changed from Open to Closed

#4 Updated by Minoru Akagi about 11 years ago

Thanks!

Also available in: Atom PDF