Skip to content

Commit

Permalink
Minor Bugfix
Browse files Browse the repository at this point in the history
Solves #1
  • Loading branch information
kmpoppe committed May 14, 2020
1 parent 5673e35 commit 8609e2a
Show file tree
Hide file tree
Showing 10 changed files with 11 additions and 6 deletions.
2 changes: 1 addition & 1 deletion notesolver/MANIFEST
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -331,7 +336,7 @@ private String getUrl(Object inputObject, Enum<linkTypes> 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);
Expand Down

0 comments on commit 8609e2a

Please sign in to comment.