#3910 closed enhancement (fixed)
[patch] Selection tool: Lasso
Reported by: | Ldp | Owned by: | team |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | Core | Version: | |
Keywords: | lasso selection | Cc: |
Description (last modified by )
Request for a new selection tool, in addition to the current rectangular selection. Having a 'lasso' selection tool would allow to select objects with more freedom, in less time than is currently possible.
For instance: If I want to select a city block, especially in the old world with its complex non-grid structures, I have to make lots of smaller rectangular selections, and click on objects on the border, just to get all of them selected. Being able to go into 'lasso' mode and draw a selection line around the objects, would be a huge help.
Attachments (12)
Change History (60)
comment:1 by , 13 years ago
comment:3 by , 13 years ago
Description: | modified (diff) |
---|---|
Summary: | Selection tool: Lasso → [patch] Selection tool: Lasso |
follow-up: 5 comment:4 by , 13 years ago
This would also be an nice selction mode for the download dialog.
comment:5 by , 13 years ago
Replying to skyper:
This would also be an nice selction mode for the download dialog.
AFAIK the API does not allow non-rectangular bboxes. Therefore, this idea cannot be realized at the moment.
by , 13 years ago
Attachment: | 3910_v2.patch added |
---|
follow-up: 7 comment:6 by , 13 years ago
I tested and reworked the patch (added i18n, install lasso as separate mapmode, cleaned up indention, …). As far as I can see, this works nicely, now. Do we have a spare shortcut? :-)
comment:7 by , 13 years ago
Replying to simon04:
I tested and reworked the patch (added i18n, install lasso as separate mapmode, cleaned up indention, …). As far as I can see, this works nicely, now. Do we have a spare shortcut? :-)
I propose S - S. Second press of S now does not do anything - it can cycle through all selection modes :)
(I am going to move angle shaping to A-A the same way)
comment:10 by , 13 years ago
Shall we commit this new map mode? I'd change the icon as bastiK suggested. For simplicity, I'd let open the shortcut mapping for a later improvement.
comment:15 by , 13 years ago
Summary: | [patch] Selection tool: Lasso → Selection tool: Lasso |
---|
comment:17 by , 13 years ago
Lasso tool is hard to select.
- Open JOSM.
- Load a map.
- Click on Lasso tool.
It's not chosen (the default selection tool is), there is "true" in the console windows.
- Click on Lasso tool again.
Only now it becomes chosen. Also, when you select another tool, a "false" appears in the console. This debug output should be removed.
follow-up: 20 comment:19 by , 13 years ago
What about activating lasso mode on switching back to Select mode by S button?
Here is the patch. The reenterMode function is added to MapMode class that is called on repeated activation attemps.
(I hope it it clean enough not to add bugs).
by , 13 years ago
Attachment: | lassoOnS.patch added |
---|
comment:20 by , 12 years ago
Replying to akks:
What about activating lasso mode on switching back to Select mode by S button?
Here is the patch. The reenterMode function is added to MapMode class that is called on repeated activation attemps.
(I hope it it clean enough not to add bugs).
Nice patch. Then we should make the lasso mode non-expert to avoid confusion when pressing [S]
multiple times.
comment:21 by , 12 years ago
see #7790 for a ticket with regard to this usability issue. akks' patch could be used if there are no objections.
BTW, this ticket should be closed. The desired functionality is implemented.
comment:22 by , 12 years ago
I updated akks' patch to the current svn version (context of one hunk has changed). There haven't been any other ideas on how to do this, so I think we should use this solution.
comment:23 by , 12 years ago
Sorry - I almost forgot about this patch myself :)
@ All: should it be included? If S-S is too radical, I can introduce preference key to activate this behavior and disable it by default. Other (exotic) option - make switching by pressing S twice: S - (box)-SS-(lasso)-SS-(box).
comment:24 by , 12 years ago
I would prefer a normal shortcut (Shift+? or Ctrl+?). The mapmodes have highest priority for shortcuts, so we shouldn't be too stingy. The behaviour from the patch may be good for experienced users, but it is almost certainly not what you'd expect from the beginning.
comment:25 by , 12 years ago
pressing 's' twice for switching modes is _really_ unexpected behaviour, we shouldn't do this.
bastiK, may I remind you of drawing mode? Pressing 'a' again while in drawing mode toggles angle locking. I think this is quite the same pattern.
The toggling could be explained by the help text in the status bar. Can we get the current shortcut key(s) for the help text? Hard-coding by "press s again to switch to lasso|rectangular mode" wouldn't be nice imho.
BTW, help texts are still missing in this patch.
I like the idea of using the same key for very related actions, and 's' for "select" is easy to remember. (see drawing mode with and without angle locking)
comment:26 by , 12 years ago
SelectAction is changed again :) So I'll add configuration parameter to the patch, disabling switching by default (for now) and commit later?
comment:27 by , 12 years ago
So you're preparing an "opt-in 's' toggles rectangluar/lasso mode" solution?
comment:28 by , 12 years ago
Will it be OK? I am not sure about default. For me, lasso and box are not too different to make switching harder...
Moreover, lasso mode is not independent, it is more like an option of Select mode...
by , 12 years ago
Attachment: | lassoOnS-5443.patch added |
---|
in this patch, repeated S switching is enabled by default, do we need checkbox in preferences?
follow-up: 30 comment:29 by , 12 years ago
I applied lassoOnS-5443.patch to r5449 and continued testing. I noticed 2 issues:
- major: after settting mappaint.select.toggle-lasso-on-repeated-S to false and then resetting it to true again, toggling is still disabled. Only a restart of josm makes it work again.
- minor: the cursor isn't changed immediately like in all the others modes. To reproduce, don't move your mouse at all. Then repeatedly press 's'. The recangle will disappear, but the lasso won't appear. This will only happen when the mouse is moved a little bit. The other way round (lasso to rectangular) changes the cursor immediately.
follow-ups: 32 43 comment:30 by , 12 years ago
Replying to Cobra:
I applied lassoOnS-5443.patch to r5449 and continued testing. I noticed 2 issues:
- major: after settting mappaint.select.toggle-lasso-on-repeated-S to false and then resetting it to true again, toggling is still disabled. Only a restart of josm makes it work again.
Switching select mode on and off (A-S for example) should work too.
- minor: the cursor isn't changed immediately like in all the others modes. To reproduce, don't move your mouse at all. Then repeatedly press 's'. The recangle will disappear, but the lasso won't appear. This will only happen when the mouse is moved a little bit. The other way round (lasso to rectangular) changes the cursor immediately.
Yes, that was confusing, fixed. Small update of the patch follows.
by , 12 years ago
Attachment: | lassoOnS-5449.patch added |
---|
comment:31 by , 12 years ago
Jar Build 5449+patch for simpler testing:
https://dl.dropbox.com/u/63393258/josm-custom.jar
By the way, do we really have two (pseudo-)different mapmodes for selection?
comment:32 by , 12 years ago
Replying to akks:
Replying to Cobra:
I applied lassoOnS-5443.patch to r5449 and continued testing. I noticed 2 issues:
- major: after settting mappaint.select.toggle-lasso-on-repeated-S to false and then resetting it to true again, toggling is still disabled. Only a restart of josm makes it work again.
Switching select mode on and off (A-S for example) should work too.
Oh, right. How could I forget to try this? m)
Imho this patch can be applied now.
comment:34 by , 12 years ago
Summary: | Selection tool: Lasso → [patch] Selection tool: Lasso |
---|
follow-up: 36 comment:35 by , 12 years ago
Any extra positive opinion and I'll apply it :)
One of current problem: if user holds S button, modes are switched randomly.
comment:36 by , 12 years ago
Replying to akks:
One of current problem: if user holds S button, modes are switched randomly.
We should fix it before applying the patch then :) Any idea right now ?
comment:38 by , 11 years ago
This ticket has already a vote result of plus two ATM. Was this patch totally forgotten ?
comment:39 by , 11 years ago
I did not manage to fix button-holding issue. While holding the button, mode entering commands repeat. We do not want one more buggy AWTlistener with timer, do not we?
by , 11 years ago
Attachment: | lassoOnS-5966.patch added |
---|
updated the latest patch again after r5965 moving some parts around
comment:40 by , 11 years ago
Does anyone know how to get rif of infinite switching when user holds S button?
follow-up: 44 comment:43 by , 10 years ago
Replying to akks:
Replying to Cobra:
- minor: the cursor isn't changed immediately like in all the others modes. To reproduce, don't move your mouse at all. Then repeatedly press 's'. The recangle will disappear, but the lasso won't appear. This will only happen when the mouse is moved a little bit. The other way round (lasso to rectangular) changes the cursor immediately.
Yes, that was confusing, fixed. Small update of the patch follows.
The lasso cursor appears only after moving the mouse on my JOSM/1.5 (7219 SVN en) Windows XP 32-Bit
.
comment:44 by , 10 years ago
Replying to AlfonZ:
The lasso cursor appears only after moving the mouse on my
JOSM/1.5 (7219 SVN en) Windows XP 32-Bit
.
Thank you for noticing! Fixing...
comment:46 by , 10 years ago
Currently the button in the edit toolbar shows the lasso and the cursor the rope. Wouldn't it be better if they both show the same icon (lasso)?
comment:47 by , 10 years ago
Icon on the toolbar is too big to be a cursor and a cursor is too simple to be a toolbar button. We have the same difference for normal selection mode. If someone creates a good icon similar to cursor (or vice versa), it can be used.
by , 10 years ago
Attachment: | mauszeiger3.png added |
---|
comment:48 by , 10 years ago
I mean this way:
(The lasso icon is this one, resized to 20px. I don't know what the correct size would be.)
Ich schließe mich dem Wunsch an. Wäre eine wichtige Funktion zum Überarbeiten.