Skip to content

Commit 98a36ea

Browse files
committed
Fix shortcut for JOSM scripts
Signed-off-by: Taylor Smock <[email protected]>
1 parent 3dbee78 commit 98a36ea

File tree

2 files changed

+6
-10
lines changed

2 files changed

+6
-10
lines changed

Diff for: src/main/java/org/openstreetmap/josm/plugins/mapillary/gui/imageinfo/ImageInfoPanel.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ private ImageInfoPanel() {
120120

121121
imgKeyValue = new HtmlPanel();
122122

123-
imgLinkAction = new WebLinkAction(marktr("View in browser"), null);
123+
imgLinkAction = new WebLinkAction();
124124

125125
/* SHORTCUT(Mapillary: Copy URL, mapillary:copy_to_clipboard_Copy_URL, CHAR_UNDEFINED, NONE) */
126126
copyImgUrlAction = new ClipboardAction(marktr("Copy URL"), tr("Copied URL to clipboard …"), null);

Diff for: src/main/java/org/openstreetmap/josm/plugins/mapillary/gui/imageinfo/WebLinkAction.java

+5-9
Original file line numberDiff line numberDiff line change
@@ -28,16 +28,12 @@ public class WebLinkAction extends MapillaryAction {
2828

2929
/**
3030
* Create a new action
31-
*
32-
* @param name The name to show users (use {@link I18n#marktr(String)})
33-
* @param uri The original URI to open
3431
*/
35-
public WebLinkAction(final String name, final URI uri) {
36-
super(tr(name), "link", tr("Open in browser"),
37-
Shortcut.registerShortcut("mapillary:open_in_browser_" + name.replace(' ', '_'),
38-
tr("Mapillary: Open {0} in browser", tr(name)), KeyEvent.CHAR_UNDEFINED, Shortcut.NONE),
39-
false, "mapillary:open_in_browser_" + name.replace(' ', '_'), false);
40-
setURI(uri);
32+
public WebLinkAction() {
33+
super(tr("View in browser"), "link", tr("Open in browser"),
34+
Shortcut.registerShortcut("mapillary:open_in_browser_View_in_browser",
35+
tr("Mapillary: Open {0} in browser", tr("View in browser")), KeyEvent.CHAR_UNDEFINED, Shortcut.NONE),
36+
false, "mapillary:open_in_browser_View_in_browser", false);
4137
}
4238

4339
/**

0 commit comments

Comments
 (0)