Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Overwriting shapefile removes all attribute data and features #17842

Closed
qgib opened this issue Dec 17, 2013 · 2 comments
Closed

Overwriting shapefile removes all attribute data and features #17842

qgib opened this issue Dec 17, 2013 · 2 comments
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Vectors Related to general vector layer handling (not specific data formats)

Comments

@qgib
Copy link
Contributor

qgib commented Dec 17, 2013

Author Name: Gillian Thornhill (Gillian Thornhill)
Original Redmine Issue: 9221
Affected QGIS version: 2.0.1
Redmine category:vectors


Using the 'save as' dialog to overwrite a shape file writes a new empty shape file, losing all the previous data in the shape file.
Steps to reproduce:
Create a new vector layer from the 'Layer: new' dialog, select 'New shape file layer'
Edit this layer, (I just set it editable, added some random points, saved changes when prompted when I turned off edit mode)
Select 'Save as' from the 'Layer' menu, leave options as defaults, Format 'ESRI Shapefile'; navigate to original file name, select in file browser.
Select 'Replace' in dialog.
Delete layer from QGIS.
Go to 'Add layer', select the shape file you just saved
Import it.
All the data has disappeared, including the attribute table.

I'm pretty sure this didn't happen in 1.8.
Also, if you skip the 'Save as' step, and delete the layer then re-import it, the data is fine.
It's the step of using 'Save as' and overwriting it that delete all the data.

Running on MacOS 10.7.5

Version info:
QGIS version 2.0.1-Dufour QGIS code revision f738351
Compiled against Qt 4.8.5 Running against Qt 4.8.5
Compiled against GDAL/OGR 1.10.1 Running against GDAL/OGR 1.10.1
Compiled against GEOS 3.4.2-CAPI-1.8.2 Running against GEOS 3.4.2-CAPI-1.8.2 r3921
PostgreSQL Client Version 9.2.4 SpatiaLite Version 4.1.1
QWT Version 6.0.2 PROJ.4 Version 480
QScintilla2 Version

@qgib
Copy link
Contributor Author

qgib commented Jan 11, 2014

Author Name: Salvatore Larosa (@slarosa)


  • os_version was changed from 10.7.5 to
  • operating_system was changed from Mac to
  • priority_id was changed from High to Severe/Regression

@qgib
Copy link
Contributor Author

qgib commented Jan 12, 2014

Author Name: Jürgen Fischer (@jef-n)


Fixed in changeset "d59ab8052287425b98bf7add107e789737ec4c7c".


  • status_id was changed from Open to Closed

@qgib qgib added Bug Either a bug report, or a bug fix. Let's hope for the latter! Vectors Related to general vector layer handling (not specific data formats) labels May 24, 2019
@qgib qgib closed this as completed May 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Vectors Related to general vector layer handling (not specific data formats)
Projects
None yet
Development

No branches or pull requests

1 participant