#7314 closed enhancement (fixed)
[patch] Faster relation selection with Alt+click and middle-click
Reported by: | joshdoe | Owned by: | team |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | Core | Version: | |
Keywords: | relation selection | Cc: |
Description
I've been working with relations quite a bit, and it could be easier to select the relation that a given way belongs to (exclusively multipolygons actually). There are a few methods I know of to select such a relation:
- Select the way, right-click on relation in property/membership dialog, then click Select relation
- Select the way, double-click on relation in Relation Toolbox (plugin reltoolbox)
Both of these require moving the mouse and clicking three times; it might not seem like much but it adds up. I propose cycling through relations in addition to ways and nodes, both via Alt+click (my preferred method) and middle-click. I believe this would entail changing NavigatableComponent.getAllNearest(), or creating a modified copy (at least for middle-click, haven't found where Alt+click is handled yet). After cycling through any nearby Ways and Nodes, Relations could be next, based on whether they're parents of the nearby Ways and Nodes.
I think most people wouldn't even notice this change, and it seems like a logical method to select relations to me. Whether to restrict this just to multipolygons or to allow any relation is something I'm not sure about.
Attachments (1)
Change History (9)
follow-up: 2 comment:1 by , 13 years ago
follow-up: 3 comment:2 by , 13 years ago
Replying to akks:
I think it is a good idea to extend middleclick.
+1
Alt-Click can cause some problems on Linux (Alt-mousedrag is used for window moving sometimes).
Yes, Alt is used by some window-managers. Alt + left click + drag currently moves the window in metacity (Gnome), xfwm (XFCE) and openbox (LXDE). Do not know about KDE. Alt+TAB and Alt + right click seem to be associated with the WM aswell.
comment:3 by , 13 years ago
Replying to skyper:
Replying to akks:
I think it is a good idea to extend middleclick.
+1
I've already done this, just by adding all parent relations of the already found nearest nodes and ways. It's a trivial patch which I will attach later.
Alt-Click can cause some problems on Linux (Alt-mousedrag is used for window moving sometimes).
Yes, Alt is used by some window-managers. Alt + left click + drag currently moves the window in metacity (Gnome), xfwm (XFCE) and openbox (LXDE). Do not know about KDE. Alt+TAB and Alt + right click seem to be associated with the WM aswell.
I know it's a problem for some, but this Alt+click
functionality is already implemented (though not well documented, so I improved the docs here). Users that have problems with Alt+click
can disable this Alt
-capturing behavior in their window manager, use the AltGr
key or right-hand Alt
key instead, or make this selection mode the default by setting selectaction.cycles.multiple.matches
to true
.
by , 13 years ago
Attachment: | get_relations_with_getAllNearest.patch added |
---|
adds parent relations of nearest nodes and ways
comment:4 by , 13 years ago
Summary: | Faster relation selection with Alt+click and middle-click → [patch] Faster relation selection with Alt+click and middle-click |
---|
This patch and the one from #7317 fully implement this. I couldn't find other functions that used getAllNearest()
, so I don't think changing this behavior should break anything.
comment:5 by , 13 years ago
As someone who's been working with relations quite a bit recently ("upgrading" GNIS nodes to ways/multipolygons), I have found this and #7317 very useful. Both patches are pretty trivial and should apply cleanly.
follow-up: 8 comment:7 by , 13 years ago
You now have 6 patches in core :)
Code is very clean, I like it. Please reopen the ticket in anything goes wrong.
comment:8 by , 13 years ago
Replying to akks:
You now have 6 patches in core :)
Code is very clean, I like it. Please reopen the ticket in anything goes wrong.
Thanks!
I think it is a good idea to extend middleclick.
Alt-Click can cause some problems on Linux (Alt-mousedrag is used for window moving sometimes).
Currently there is "AreaBoundary" action in Utilsplugin2 that implement relation cycling (together with more complex boundary selection).