Ticket #24670: patch_24670.txt

File patch_24670.txt, 1.1 KB (added by DanProgs <Abenteurer.2901@…>, 5 days ago)
Line 
1### Eclipse Workspace Patch 1.0
2#P JMapViewer
3Index: src/org/openstreetmap/gui/jmapviewer/AttributionSupport.java
4===================================================================
5--- src/org/openstreetmap/gui/jmapviewer/AttributionSupport.java (revision 36494)
6+++ src/org/openstreetmap/gui/jmapviewer/AttributionSupport.java (working copy)
7@@ -123,14 +123,11 @@
8 }
9
10 public boolean handleAttributionCursor(Point p) {
11- if (attrTextBounds != null && attrTextBounds.contains(p)) {
12- return true;
13- } else if (attrImageBounds != null && attrImageBounds.contains(p)) {
14- return true;
15- } else if (attrToUBounds != null && attrToUBounds.contains(p)) {
16- return true;
17- }
18- return false;
19+ if (p == null) return false;
20+
21+ return (attrTextBounds != null && attrTextBounds.contains(p))
22+ || (attrImageBounds != null && attrImageBounds.contains(p))
23+ || (attrToUBounds != null && attrToUBounds.contains(p));
24 }
25
26 public boolean handleAttribution(Point p, boolean click) {