Skip to content

Commit 1138a62

Browse files
committed
allow shortcut parsing, fix argument order
1 parent 7a67116 commit 1138a62

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

src/main/java/org/openstreetmap/josm/plugins/mapillary/actions/MapPointObjectLayerAction.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ public class MapPointObjectLayerAction extends JosmAction {
2727
"Displays the layer displaying the map point objects detected by Mapillary");
2828

2929
public MapPointObjectLayerAction() {
30-
super(tr(ACTION_NAME), MapillaryPlugin.LOGO.setSize(ImageSizes.DEFAULT), tr(TOOLTIP), Shortcut
31-
.registerShortcut("mapillary:pointFeaturesLayer", tr(ACTION_NAME), KeyEvent.CHAR_UNDEFINED, Shortcut.NONE),
30+
super(tr(ACTION_NAME), MapillaryPlugin.LOGO.setSize(ImageSizes.DEFAULT), tr(TOOLTIP),
31+
Shortcut.registerShortcut("mapillary:pointFeaturesLayer", tr(ACTION_NAME), KeyEvent.CHAR_UNDEFINED, Shortcut.NONE),
3232
false, "mapillary:pointFeaturesLayer", true);
3333
}
3434

src/main/java/org/openstreetmap/josm/plugins/mapillary/gui/dialog/ImageNavigationDialog.java

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -39,28 +39,28 @@ public class ImageNavigationDialog extends ToggleDialog
3939
implements LayerManager.LayerChangeListener, IGeoImageLayer.ImageChangeListener {
4040
/* Shortcut for image navigation: forward */
4141
private static final Shortcut FORWARD = Shortcut.registerShortcut("mapillary:image_navigation:forward",
42-
tr("Mapillary: Image Navigation: Forward"), Shortcut.NONE, KeyEvent.CHAR_UNDEFINED);
42+
tr("Mapillary: Image Navigation: Forward"), KeyEvent.CHAR_UNDEFINED, Shortcut.NONE);
4343
/* Shortcut for image navigation: left */
4444
private static final Shortcut LEFT = Shortcut.registerShortcut("mapillary:image_navigation:left",
45-
tr("Mapillary: Image Navigation: Left"), Shortcut.NONE, KeyEvent.CHAR_UNDEFINED);
45+
tr("Mapillary: Image Navigation: Left"), KeyEvent.CHAR_UNDEFINED, Shortcut.NONE);
4646
/* Shortcut for image navigation: right */
4747
private static final Shortcut RIGHT = Shortcut.registerShortcut("mapillary:image_navigation:right",
48-
tr("Mapillary: Image Navigation: Right"), Shortcut.NONE, KeyEvent.CHAR_UNDEFINED);
48+
tr("Mapillary: Image Navigation: Right"), KeyEvent.CHAR_UNDEFINED, Shortcut.NONE);
4949
/* Shortcut for image navigation: turn left */
5050
private static final Shortcut TURN_LEFT = Shortcut.registerShortcut("mapillary:image_navigation:turn_left",
51-
tr("Mapillary: Image Navigation: Turn Left"), Shortcut.NONE, KeyEvent.CHAR_UNDEFINED);
51+
tr("Mapillary: Image Navigation: Turn Left"), KeyEvent.CHAR_UNDEFINED, Shortcut.NONE);
5252
/* Shortcut for image navigation: turn right */
5353
private static final Shortcut TURN_RIGHT = Shortcut.registerShortcut("mapillary:image_navigation:turn_right",
54-
tr("Mapillary: Image Navigation: Turn Right"), Shortcut.NONE, KeyEvent.CHAR_UNDEFINED);
54+
tr("Mapillary: Image Navigation: Turn Right"), KeyEvent.CHAR_UNDEFINED, Shortcut.NONE);
5555
/* Shortcut for image navigation: reverse */
5656
private static final Shortcut U_TURN = Shortcut.registerShortcut("mapillary:image_navigation:reverse",
57-
tr("Mapillary: Image Navigation: Reverse"), Shortcut.NONE, KeyEvent.CHAR_UNDEFINED);
57+
tr("Mapillary: Image Navigation: Reverse"), KeyEvent.CHAR_UNDEFINED, Shortcut.NONE);
5858
/* Shortcut for image navigation: back */
5959
private static final Shortcut BACK = Shortcut.registerShortcut("mapillary:image_navigation:back",
60-
tr("Mapillary: Image Navigation: Back"), Shortcut.NONE, KeyEvent.CHAR_UNDEFINED);
60+
tr("Mapillary: Image Navigation: Back"), KeyEvent.CHAR_UNDEFINED, Shortcut.NONE);
6161
/* Shortcut for image navigation: 360deg panoramic */
6262
private static final Shortcut PANO = Shortcut.registerShortcut("mapillary:image_navigation:pano",
63-
tr("Mapillary: Image Navigation: 360 panoramic"), Shortcut.NONE, KeyEvent.CHAR_UNDEFINED);
63+
tr("Mapillary: Image Navigation: 360 panoramic"), KeyEvent.CHAR_UNDEFINED, Shortcut.NONE);
6464
private ImageNavigation imageNavigation;
6565
private JPanel panel;
6666

@@ -69,8 +69,8 @@ public class ImageNavigationDialog extends ToggleDialog
6969
*/
7070
public ImageNavigationDialog() {
7171
super(tr("Mapillary: Image Navigation"), "mapillary-main", tr("Navigate between different Mapillary images"),
72-
Shortcut.registerShortcut("mapillary:image_navigation", tr("Mapillary: Image Navigation"), Shortcut.NONE,
73-
KeyEvent.CHAR_UNDEFINED),
72+
Shortcut.registerShortcut("mapillary:image_navigation", tr("Mapillary: Image Navigation"), KeyEvent.CHAR_UNDEFINED,
73+
Shortcut.NONE),
7474
80);
7575
MainApplication.getLayerManager().addAndFireLayerChangeListener(this);
7676
}

0 commit comments

Comments
 (0)