Bug report #17853
Duplicate Feature and Duplicate Feature (redigizited) operate on multiple features
|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 #:||25748|
If I use the new Duplicate Feature or Duplicate Feature (redigitized) actions, and click on overlapping features, all are duplicated. I think either the actions should be renamed to "Duplicate Features", or just the first encountered feature should be duplicated (even better, prioritize selected features if there's any selection on the layer).
#3 Updated by David Signer over 1 year ago
David Signer wrote:
This is concerning not only the duplicate actions but any action listed in the feature action menu of the canvas.
So I guess for all actions just the first feature should be handled. Right?
I just checked out this bug again. I understand that it's not expected to duplicate the whole stack of features at the same time. But because it's for all actions I'm not sure how to handle it. If it should only select the feature on the top, should this be done for all actions or only the duplicate feature action? I think it would make sense to have it general. But aren't there actions where we expect to do it on all the features? And if we make it individually, how should we handle it for manually created actions - having a configuration on that?
#5 Updated by David Signer over 1 year ago
Thanks for your feedback.
I'm still thinking about. Because on redigitized duplication it only takes one feature. But what seems to be correct here, is actually the bug. Because the action is started for every feature on the "stack". But every action overwrites the MapTool of the action before, and so it digitizes and duplicates only the one on top of the stack. I would not avoid that, because I'm sure we don't want to redigitize a duplication of the whole stack, because we don't know which one is the currently digitized.
So I see some options:
1. Rename "Duplicate feature" to "Duplicate features" and keep the "Duplicate feature and digitize" in singular. This would be a quick fix. Not realy nice, but at least less confusing for the user.
2. I make sure that it only takes the one on the top for the duplication-actions. So they are different to all the other actions. But probably that's not that bad.
3. I make sure that it only takes the one on the top for all the actions. But like I mentioned before, the user possibly expects to have the action on all the features, so I wouldn't do that.