- Timestamp:
- 2018-09-15T13:20:45+02:00 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/dialogs/SelectionListDialog.java
r14221 r14250 761 761 if (org.openstreetmap.josm.actions.search.SearchAction.getSearchHistory().isEmpty()) 762 762 return; 763 JPopupMenu menu = new SearchPopupMenu(); 764 Rectangle r = parent.getBounds(); 765 menu.show(parent, r.x, r.y + r.height); 763 if (parent.isShowing()) { 764 JPopupMenu menu = new SearchPopupMenu(); 765 Rectangle r = parent.getBounds(); 766 menu.show(parent, r.x, r.y + r.height); 767 } 766 768 } 767 769 … … 841 843 public static void launch(Component parent, Collection<Collection<? extends OsmPrimitive>> history) { 842 844 if (history == null || history.isEmpty()) return; 843 JPopupMenu menu = new SelectionHistoryPopup(history); 844 Rectangle r = parent.getBounds(); 845 menu.show(parent, r.x, r.y + r.height); 845 if (parent.isShowing()) { 846 JPopupMenu menu = new SelectionHistoryPopup(history); 847 Rectangle r = parent.getBounds(); 848 menu.show(parent, r.x, r.y + r.height); 849 } 846 850 } 847 851
Note:
See TracChangeset
for help on using the changeset viewer.