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

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

Open
qgib opened this issue Jan 10, 2019 · 6 comments
Open
Labels
Attribute Table Bug Either a bug report, or a bug fix. Let's hope for the latter!

Comments

@qgib
Copy link
Contributor

qgib commented Jan 10, 2019

Author Name: Alister Hood (@AlisterH)
Original Redmine Issue: 20965
Affected QGIS version: 3.4.3
Redmine category:attribute_table


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.

@qgib
Copy link
Contributor Author

qgib commented Jan 10, 2019

Author Name: Alister Hood (@AlisterH)


  • 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.


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

@qgib
Copy link
Contributor Author

qgib commented Jan 10, 2019

Author Name: Alister Hood (@AlisterH)


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

@qgib
Copy link
Contributor Author

qgib commented Jan 11, 2019

Author Name: Nyall Dawson (@nyalldawson)


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


  • status_id was changed from Open to Feedback

@qgib
Copy link
Contributor Author

qgib commented Jan 11, 2019

Author Name: Alister Hood (@AlisterH)


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 ;) ?

@qgib
Copy link
Contributor Author

qgib commented Jan 11, 2019

Author Name: Alister Hood (@AlisterH)


BTW (more seriously), did you ever see my comments at #7516?


  • status_id was changed from Feedback to Open
  • subject was changed from features duplicated after "Making permanent" a temporary scratch layer to unsaved features duplicated after "Making permanent" a temporary scratch layer

@qgib qgib added Bug Either a bug report, or a bug fix. Let's hope for the latter! Attribute Table labels May 25, 2019
@jfbourdon
Copy link
Contributor

This issue is still present in 3.20.0 and that's it's not a Attribute Table issue. I would add that if the memory layer is saved using the contextual menu Export -> Save Features As..., then the features are not duplicated. It's really only if the layer is saved to disk using Make Permanent...

If the layer is made permanent while being edited, as a user I would have expected the following behavior:

  1. Save layer to disk without committing the changes made after the last committed changes
  2. Reload layer, open editing session and add the non committed changes to the current buffer to still allow roll back

Instead of what appear to me to be:

  1. Save layer to disk after committing the changes made after the last committed changes
  2. Reload layer, open editing session and add the non committed changes to the current buffer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Attribute Table Bug Either a bug report, or a bug fix. Let's hope for the latter!
Projects
None yet
Development

No branches or pull requests

2 participants