#18638 closed enhancement (fixed)
[PATCH] There should be a method to cycle through layers
Reported by: | taylor.smock | Owned by: | team |
---|---|---|---|
Priority: | normal | Milestone: | 20.02 |
Component: | Core | Version: | |
Keywords: | layer, cycle | Cc: |
Description (last modified by )
I originally used CTRL+[/CTRL+]
for the layer switches, but I figured SHIFT+{/SHIFT+}
would be better ([ -> { due to SHIFT converting [ to {).
I haven't written tests yet -- I'm doing that now.
I probably didn't pick the right class to instantiate the new class in (I'm currently using LayerListDialog
, but I figured that was probably the best place to put it).
Attachments (8)
Change History (28)
by , 5 years ago
Attachment: | 18638.patch added |
---|
comment:1 by , 5 years ago
Description: | modified (diff) |
---|
by , 5 years ago
Attachment: | 18638.1.patch added |
---|
Switch back to [
and ]
from {
and }
along with tests
comment:2 by , 5 years ago
Description: | modified (diff) |
---|
comment:4 by , 5 years ago
Milestone: | → 20.02 |
---|
comment:5 by , 5 years ago
Milestone: | 20.02 → 20.03 |
---|
by , 5 years ago
Attachment: | 18638.review.patch added |
---|
codestyle fixed. Beware to please the Shortcut parser
follow-up: 7 comment:6 by , 5 years ago
by , 5 years ago
Attachment: | 18638_junit.jpg added |
---|
by , 5 years ago
Attachment: | 18638.2.patch added |
---|
Split cycle up/cycle down actions into separate files, fix shortcut issues (single line), and some other pmd issues
comment:7 by , 5 years ago
I put it in the MapWithAI plugin temporarily, and it also complained about the tests. I fixed them, but forgot to update the patch here.
It turns out that (for whatever reason), the CI environment wasn't passing the modifier keys, IIRC. I ended up splitting the actions up, instead of trying to have one class (it worked on Mac OS X, but not in the CI environment).
I forgot to bring the changes back over to this bug report. I should have, so you wouldn't have duplicated some of the work.
comment:10 by , 5 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
I forgot to add the initialization code to the patch.
by , 5 years ago
Attachment: | 18638.3.patch added |
---|
Actually initialize the actions (in LayerListDialog)
comment:12 by , 5 years ago
Milestone: | 20.03 → 20.02 |
---|
comment:13 by , 5 years ago
By the way, [ and ] keys are used by the "todo" plugin to cycle through the todo list.
comment:14 by , 5 years ago
I knew that, which is why I used shift
+ [
/shift
+ ]
(which translates the ]
to }
and [
to {
, which made testing interesting).
comment:16 by , 5 years ago
The names for the keyboard shortcuts and for the action seem not consistent to each other. Currently we have
Cycle layers up
for the shortcut
Cycle layer up
for the action and
Cycle up through layers
for the hint.
Cycle layers down
for the shortcut
Cycle layers
for the down action and
Cycle through layers
for the hint
Are different names for the shortcut and for the action necessary?
Why is plural used when only one layer is affected? This good action is not as shuffling the background layers around each other.
Suggestion:
Cycle layer up
for shortcut and action
Cycle through data layers upwards
for the hint.
Cycle layer down
for the shortcut and action
Cycle through data layers downwards
for the hint
comment:17 by , 5 years ago
FYI: I see this message in some unit tests, e.g. JoinAreasActionTest
2020-03-06 09:40:10.255 INFORMATION: Registered toolbar action cycle-layer overwritten: org.openstreetmap.josm.gui.dialogs.layer.CycleLayerUpAction gets org.openstreetmap.josm.gui.dialogs.layer.CycleLayerDownAction
by , 5 years ago
Attachment: | 18638.shortcuts.patch added |
---|
comment:18 by , 5 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
My patch fixes only the issue reported in comment:17
by , 5 years ago
Attachment: | 18638.shortcuts_names.patch added |
---|
Modify GerdP's patch to add consistency in action UI descriptions
Initial patch (no tests)