diff --git a/notesolver/MANIFEST b/notesolver/MANIFEST index 38ad33e..e651e2a 100644 --- a/notesolver/MANIFEST +++ b/notesolver/MANIFEST @@ -7,7 +7,7 @@ Plugin-Class: org.openstreetmap.josm.plugins.notesolver.NoteSolverPlug in Plugin-Description: Used for closing notes when uploading a changeset and referencing them in each other's comments to keep references. -Plugin-Date: 2020-05-14T06:58:47.130 +Plugin-Date: 2020-05-14T21:46:04.787 Author: Kai Michael Poppe Plugin-Link: https://wiki.openstreetmap.org/wiki/User:Kmpoppe/Plugins# noteSolver diff --git a/notesolver/build/org/openstreetmap/josm/plugins/notesolver/NoteList.class b/notesolver/build/org/openstreetmap/josm/plugins/notesolver/NoteList.class index 4f95208..1680d4f 100644 Binary files a/notesolver/build/org/openstreetmap/josm/plugins/notesolver/NoteList.class and b/notesolver/build/org/openstreetmap/josm/plugins/notesolver/NoteList.class differ diff --git a/notesolver/build/org/openstreetmap/josm/plugins/notesolver/NoteSolverPlugin$4.class b/notesolver/build/org/openstreetmap/josm/plugins/notesolver/NoteSolverPlugin$4.class index a9b90d2..efc0c0d 100644 Binary files a/notesolver/build/org/openstreetmap/josm/plugins/notesolver/NoteSolverPlugin$4.class and b/notesolver/build/org/openstreetmap/josm/plugins/notesolver/NoteSolverPlugin$4.class differ diff --git a/notesolver/build/org/openstreetmap/josm/plugins/notesolver/NoteSolverPlugin$5.class b/notesolver/build/org/openstreetmap/josm/plugins/notesolver/NoteSolverPlugin$5.class index b584947..0f1827c 100644 Binary files a/notesolver/build/org/openstreetmap/josm/plugins/notesolver/NoteSolverPlugin$5.class and b/notesolver/build/org/openstreetmap/josm/plugins/notesolver/NoteSolverPlugin$5.class differ diff --git a/notesolver/build/org/openstreetmap/josm/plugins/notesolver/NoteSolverPlugin$6.class b/notesolver/build/org/openstreetmap/josm/plugins/notesolver/NoteSolverPlugin$6.class index ade8e69..0fa993e 100644 Binary files a/notesolver/build/org/openstreetmap/josm/plugins/notesolver/NoteSolverPlugin$6.class and b/notesolver/build/org/openstreetmap/josm/plugins/notesolver/NoteSolverPlugin$6.class differ diff --git a/notesolver/build/org/openstreetmap/josm/plugins/notesolver/NoteSolverPlugin$7.class b/notesolver/build/org/openstreetmap/josm/plugins/notesolver/NoteSolverPlugin$7.class index 8d989c6..d74c559 100644 Binary files a/notesolver/build/org/openstreetmap/josm/plugins/notesolver/NoteSolverPlugin$7.class and b/notesolver/build/org/openstreetmap/josm/plugins/notesolver/NoteSolverPlugin$7.class differ diff --git a/notesolver/build/org/openstreetmap/josm/plugins/notesolver/NoteSolverPlugin$linkTypes.class b/notesolver/build/org/openstreetmap/josm/plugins/notesolver/NoteSolverPlugin$linkTypes.class index 6b1e602..e24303f 100644 Binary files a/notesolver/build/org/openstreetmap/josm/plugins/notesolver/NoteSolverPlugin$linkTypes.class and b/notesolver/build/org/openstreetmap/josm/plugins/notesolver/NoteSolverPlugin$linkTypes.class differ diff --git a/notesolver/build/org/openstreetmap/josm/plugins/notesolver/NoteSolverPlugin$menuTypes.class b/notesolver/build/org/openstreetmap/josm/plugins/notesolver/NoteSolverPlugin$menuTypes.class index 41779ed..0b05cd7 100644 Binary files a/notesolver/build/org/openstreetmap/josm/plugins/notesolver/NoteSolverPlugin$menuTypes.class and b/notesolver/build/org/openstreetmap/josm/plugins/notesolver/NoteSolverPlugin$menuTypes.class differ diff --git a/notesolver/build/org/openstreetmap/josm/plugins/notesolver/NoteSolverPlugin.class b/notesolver/build/org/openstreetmap/josm/plugins/notesolver/NoteSolverPlugin.class index 4e31329..13f9dfc 100644 Binary files a/notesolver/build/org/openstreetmap/josm/plugins/notesolver/NoteSolverPlugin.class and b/notesolver/build/org/openstreetmap/josm/plugins/notesolver/NoteSolverPlugin.class differ diff --git a/notesolver/src/org/openstreetmap/josm/plugins/notesolver/NoteSolverPlugin.java b/notesolver/src/org/openstreetmap/josm/plugins/notesolver/NoteSolverPlugin.java index 7c220ac..fba877f 100644 --- a/notesolver/src/org/openstreetmap/josm/plugins/notesolver/NoteSolverPlugin.java +++ b/notesolver/src/org/openstreetmap/josm/plugins/notesolver/NoteSolverPlugin.java @@ -128,10 +128,15 @@ public void selectedNoteChanged(NoteData noteData) { for (JMenuItem menuItem : mainMenuEntries(menuTypes.MAIN)) contextMenu.add(menuItem); Point p = MainApplication.getMainFrame().getMousePosition(); - contextMenu.setInvoker(MainApplication.getMainFrame().getComponentAt(p)); - contextMenu.setLocation(p); - contextMenu.setEnabled(true); - contextMenu.setVisible(true); + if (p != null) { + Component c = MainApplication.getMainFrame().getComponentAt(p); + if (c != null) { + contextMenu.setInvoker(c); + contextMenu.setLocation(p); + contextMenu.setEnabled(true); + contextMenu.setVisible(true); + } + } } } @Override @@ -331,7 +336,7 @@ private String getUrl(Object inputObject, Enum linkType) { if (linkType == linkTypes.NOTE) { thisNumber = ((Note)inputObject).getId(); } else if (linkType == linkTypes.CHANGESET) { - thisNumber = (Long)inputObject; + thisNumber = Integer.toUnsignedLong((Integer)inputObject); } if (thisNumber > 0L) { returnValue = serverUrl + linkType.name().toLowerCase() + "/" + Long.toString(thisNumber);