Bug report #20965

unsaved features duplicated after "Making permanent" a temporary scratch layer

Added by Alister Hood about 1 year ago. Updated about 1 year ago.

Status:Open
Priority:Normal
Assignee:-
Category:Attribute table
Affected QGIS version:3.4.3 Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:No Copied to github as #:28784

Description

As per the subject; as far as I can see this hasn't been reported yet, but that does surprise me.

To reproduce:
- Create a temporary scratch layer (I tested with polyline and polygon layers).
- Create some features, or select them from another layer and copy and paste them to the temporary scratch layer.
- Click the ram icon in the layers panel to save the layer to disk.
- Open the attribute table and there appear to be twice as many features as there should be. I'm not sure if this causes any problems with other functionality.
- Remove the layer from the project, then go to where it was saved and add it back.
- Open the attribute table and the ghost features have disappeared.

Tested on Windows.

History

#1 Updated by Alister Hood about 1 year ago

  • Subject changed from attribute table shows ghost features after "Making permanent" a temporary scratch layer to duplicate features after "Making permanent" a temporary scratch layer

- Remove the layer from the project, then go to where it was saved and add it back.
- Open the attribute table and the ghost features have disappeared.

Sorry, sometimes this isn't the case i.e. the duplicate features are still there. I'm not sure what is different in the case where they disappear when the layer is reopened.

#2 Updated by Alister Hood about 1 year ago

  • Subject changed from duplicate features after "Making permanent" a temporary scratch layer to features duplicated after "Making permanent" a temporary scratch layer

#3 Updated by Nyall Dawson about 1 year ago

  • Status changed from Open to Feedback

Seems to be the case when you have unsaved features added to the memory layer when you run "make permanent". Can you confirm?

#4 Updated by Alister Hood about 1 year ago

Nyall Dawson wrote:

Seems to be the case when you have unsaved features added to the memory layer when you run "make permanent". Can you confirm?

Yes, that seems to be right. That explains this:

Alister Hood wrote:

Sorry, sometimes this isn't the case i.e. the duplicate features are still there. I'm not sure what is different in the case where they disappear when the layer is reopened.

I had the impression it was somehow related to layers in edit mode, but I hadn't figured out that it affected unsaved features only (and always).

BTW isn't a "saved feature" in a memory layer an oxymoron ;) ?

#5 Updated by Alister Hood about 1 year ago

  • Status changed from Feedback to Open
  • Subject changed from features duplicated after "Making permanent" a temporary scratch layer to unsaved features duplicated after "Making permanent" a temporary scratch layer

BTW (more seriously), did you ever see my comments at https://github.com/qgis/QGIS/pull/7516?

Also available in: Atom PDF