Skip to content
This repository has been archived by the owner on Nov 1, 2023. It is now read-only.

Commit

Permalink
allow shortcut parsing, fix argument order
Browse files Browse the repository at this point in the history
  • Loading branch information
stoecker committed Apr 28, 2023
1 parent 7a67116 commit 1138a62
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ public class MapPointObjectLayerAction extends JosmAction {
"Displays the layer displaying the map point objects detected by Mapillary");

public MapPointObjectLayerAction() {
super(tr(ACTION_NAME), MapillaryPlugin.LOGO.setSize(ImageSizes.DEFAULT), tr(TOOLTIP), Shortcut
.registerShortcut("mapillary:pointFeaturesLayer", tr(ACTION_NAME), KeyEvent.CHAR_UNDEFINED, Shortcut.NONE),
super(tr(ACTION_NAME), MapillaryPlugin.LOGO.setSize(ImageSizes.DEFAULT), tr(TOOLTIP),
Shortcut.registerShortcut("mapillary:pointFeaturesLayer", tr(ACTION_NAME), KeyEvent.CHAR_UNDEFINED, Shortcut.NONE),
false, "mapillary:pointFeaturesLayer", true);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,28 +39,28 @@ public class ImageNavigationDialog extends ToggleDialog
implements LayerManager.LayerChangeListener, IGeoImageLayer.ImageChangeListener {
/* Shortcut for image navigation: forward */
private static final Shortcut FORWARD = Shortcut.registerShortcut("mapillary:image_navigation:forward",
tr("Mapillary: Image Navigation: Forward"), Shortcut.NONE, KeyEvent.CHAR_UNDEFINED);
tr("Mapillary: Image Navigation: Forward"), KeyEvent.CHAR_UNDEFINED, Shortcut.NONE);
/* Shortcut for image navigation: left */
private static final Shortcut LEFT = Shortcut.registerShortcut("mapillary:image_navigation:left",
tr("Mapillary: Image Navigation: Left"), Shortcut.NONE, KeyEvent.CHAR_UNDEFINED);
tr("Mapillary: Image Navigation: Left"), KeyEvent.CHAR_UNDEFINED, Shortcut.NONE);
/* Shortcut for image navigation: right */
private static final Shortcut RIGHT = Shortcut.registerShortcut("mapillary:image_navigation:right",
tr("Mapillary: Image Navigation: Right"), Shortcut.NONE, KeyEvent.CHAR_UNDEFINED);
tr("Mapillary: Image Navigation: Right"), KeyEvent.CHAR_UNDEFINED, Shortcut.NONE);
/* Shortcut for image navigation: turn left */
private static final Shortcut TURN_LEFT = Shortcut.registerShortcut("mapillary:image_navigation:turn_left",
tr("Mapillary: Image Navigation: Turn Left"), Shortcut.NONE, KeyEvent.CHAR_UNDEFINED);
tr("Mapillary: Image Navigation: Turn Left"), KeyEvent.CHAR_UNDEFINED, Shortcut.NONE);
/* Shortcut for image navigation: turn right */
private static final Shortcut TURN_RIGHT = Shortcut.registerShortcut("mapillary:image_navigation:turn_right",
tr("Mapillary: Image Navigation: Turn Right"), Shortcut.NONE, KeyEvent.CHAR_UNDEFINED);
tr("Mapillary: Image Navigation: Turn Right"), KeyEvent.CHAR_UNDEFINED, Shortcut.NONE);
/* Shortcut for image navigation: reverse */
private static final Shortcut U_TURN = Shortcut.registerShortcut("mapillary:image_navigation:reverse",
tr("Mapillary: Image Navigation: Reverse"), Shortcut.NONE, KeyEvent.CHAR_UNDEFINED);
tr("Mapillary: Image Navigation: Reverse"), KeyEvent.CHAR_UNDEFINED, Shortcut.NONE);
/* Shortcut for image navigation: back */
private static final Shortcut BACK = Shortcut.registerShortcut("mapillary:image_navigation:back",
tr("Mapillary: Image Navigation: Back"), Shortcut.NONE, KeyEvent.CHAR_UNDEFINED);
tr("Mapillary: Image Navigation: Back"), KeyEvent.CHAR_UNDEFINED, Shortcut.NONE);
/* Shortcut for image navigation: 360deg panoramic */
private static final Shortcut PANO = Shortcut.registerShortcut("mapillary:image_navigation:pano",
tr("Mapillary: Image Navigation: 360 panoramic"), Shortcut.NONE, KeyEvent.CHAR_UNDEFINED);
tr("Mapillary: Image Navigation: 360 panoramic"), KeyEvent.CHAR_UNDEFINED, Shortcut.NONE);
private ImageNavigation imageNavigation;
private JPanel panel;

Expand All @@ -69,8 +69,8 @@ public class ImageNavigationDialog extends ToggleDialog
*/
public ImageNavigationDialog() {
super(tr("Mapillary: Image Navigation"), "mapillary-main", tr("Navigate between different Mapillary images"),
Shortcut.registerShortcut("mapillary:image_navigation", tr("Mapillary: Image Navigation"), Shortcut.NONE,
KeyEvent.CHAR_UNDEFINED),
Shortcut.registerShortcut("mapillary:image_navigation", tr("Mapillary: Image Navigation"), KeyEvent.CHAR_UNDEFINED,
Shortcut.NONE),
80);
MainApplication.getLayerManager().addAndFireLayerChangeListener(this);
}
Expand Down

0 comments on commit 1138a62

Please sign in to comment.