-
Notifications
You must be signed in to change notification settings - Fork 133
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
Disallow DropFilterAction between same layers #292
Disallow DropFilterAction between same layers #292
Conversation
Signed-off-by: Nikolaos Pringouris <nprigour@gmail.com>
@nprigour I guess your change looks reasonable. I'm wondering a bit how to test this change in running application. I'm not aware of this functionality . Can you help here or point to a help page? |
You can check this as follows supposing you have loaded 2 shapefiles to a map. While selection tool is active select a feature i Map editor. Then you can do one of the following actions:
Action 1 is the main reason for providing this PR. With the suggested fix it does nothing, while previously it caused a copy of the selected feature on the same layer resulting in duplicate features. This may seemed weird to a potential user since if you were clicking very quickly and selecting features you may accidentally copy features on the same layer. |
I tried the following:
Finally a new layer is listed in Layers View with the same resource Then I tried to drag the layer on the same layer within Layers View: Nothing happens. When I use copy and paste ( layer is selected) on Map, then selected feature is copied within the same ressource (as expected) I'm wondering how to drag and drop a layer to reproduce behavior you mentioned. I guess I miss something |
I did not say to select a layer in layer view or d&d a layer! |
What about this @fgdrf? |
I'll try to test it tomorrow again. |
@nprigour Just tested uDig build from current state of master (without your fix) and it works quite well. I was able to copy a feature on the map-panel using Drag&Drop. So I'm not sure if your fix is required. Can you test the scenario again? Many Thanks |
Yes indeed feature copy is possible I do not deny it. However the reasons for the fix as explained in a previous comment (see my comment on 27 June 2018) are the following (based on my personal experience from an application we have developed):
Based on all the above my humble opinion is that allowing such a D&D within the same layer causes more problems than the ones it solves and I strongly suggest to disable it. If copy between the same layer is desired it can still be achieved by the copy-paste combination of actions which is more or less fully controlled by the user. |
@nprigour Should we merge it or abandon? My read of your last comment is: Let's deactivale D&D of features if source and destination layer are the same. If so, lets prepare another change (for Milestone 2.1.0 ??) |
For me its definetely a must merge PR. Maybe we disallow D&D within the same layer but:
|
Signed-off-by: Nikolaos Pringouris <nprigour@gmail.com>
DropFilterAction is currently allowed within the same layer. This should be avoided since it may cause some weird result
Signed-off-by: Nikolaos Pringouris nprigour@gmail.com