Bug report #19489
Updated by Jürgen Fischer about 6 years ago
My 600 hand-edited features are now gone. I made a "Duplicate Layer" to perform my (click table line, shift-click another table line, Edit mode, trash icon) deletions in, but judging from the results on disk, the selections and deletions were applied to the original layer, and a second layer was not saved.
I don't remember it asking me for a new file name... The Duplicate must have overwritten the original files. This is way too dangerous for real users!
I worked with the duplicate layer successfully, as far as I could tell. But when I went back to the original layer to create a new selection, it had decided the remaining items that were not deleted from the duplicate layer (that were then saved into the original filename) were "Filtered" in the original layer. I had never intentionally used a filter.
Up until I quit QGIS, the original layer showed all 608 features, both in the "Show feature count" label and in the header of the Attribute Table. Only the few it had decided were Filtered (the ones I had not deleted from the duplicate layer) would show in the table, and "Show all Features" refused to show the rest.
I searched all over the web for clues, but couldn't find any way to show the other 600 features. Apparently they were already gone, despite the obvious counts.
The counts were a problem earlier in the day on a related layer - see "XSCutLines imported from Transect by RiverGIS - count 0.JPG". Despite there obviously being 608 items in the table, the count in the Layers panel insisted on zero. Probably a different issue.
I've been wishing there was a config option to always "Show feature count" in the Layers panel. But if it is this misleading, maybe not...
Searching before posting this, I see #13782
[[https://issues.qgis.org/issues/13782]]
Deleting columns in duplicate layer also deletes them in original layer
Where a similar issue was declared invalid: "'duplicate layer' do not duplicate (create a copy of) the datasource, it just duplicates in the project, the layer is the same."
I strongly disagree! QGIS in this scenario deletes user data with no warning, and the user interface actually misleads the user into believing the data is still there! Until the project is closed and re-opened, when the sad truth is unavoidable.
Obviously edits within a session affect the original and duplicate layers independently. *If Duplicate Layer is intended to not create its own datasource, then changes to it should not be saved.* It would be nice if you asked us if we want them saved... But *they absolutely should not be saved to the original datasource files with no warning!*
I don't remember it asking me for a new file name... The Duplicate must have overwritten the original files. This is way too dangerous for real users!
I worked with the duplicate layer successfully, as far as I could tell. But when I went back to the original layer to create a new selection, it had decided the remaining items that were not deleted from the duplicate layer (that were then saved into the original filename) were "Filtered" in the original layer. I had never intentionally used a filter.
Up until I quit QGIS, the original layer showed all 608 features, both in the "Show feature count" label and in the header of the Attribute Table. Only the few it had decided were Filtered (the ones I had not deleted from the duplicate layer) would show in the table, and "Show all Features" refused to show the rest.
I searched all over the web for clues, but couldn't find any way to show the other 600 features. Apparently they were already gone, despite the obvious counts.
The counts were a problem earlier in the day on a related layer - see "XSCutLines imported from Transect by RiverGIS - count 0.JPG". Despite there obviously being 608 items in the table, the count in the Layers panel insisted on zero. Probably a different issue.
I've been wishing there was a config option to always "Show feature count" in the Layers panel. But if it is this misleading, maybe not...
Searching before posting this, I see #13782
[[https://issues.qgis.org/issues/13782]]
Deleting columns in duplicate layer also deletes them in original layer
Where a similar issue was declared invalid: "'duplicate layer' do not duplicate (create a copy of) the datasource, it just duplicates in the project, the layer is the same."
I strongly disagree! QGIS in this scenario deletes user data with no warning, and the user interface actually misleads the user into believing the data is still there! Until the project is closed and re-opened, when the sad truth is unavoidable.
Obviously edits within a session affect the original and duplicate layers independently. *If Duplicate Layer is intended to not create its own datasource, then changes to it should not be saved.* It would be nice if you asked us if we want them saved... But *they absolutely should not be saved to the original datasource files with no warning!*