From f658b6fbcf9a3aaf24aae16db8a1decca3dd7631 Mon Sep 17 00:00:00 2001 From: Hannes Janetzek Date: Fri, 22 Feb 2013 08:32:15 +0100 Subject: [PATCH] fix text AABB --- src/org/oscim/renderer/overlays/TextOverlayExp.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/org/oscim/renderer/overlays/TextOverlayExp.java b/src/org/oscim/renderer/overlays/TextOverlayExp.java index 14901a29..eb99008b 100644 --- a/src/org/oscim/renderer/overlays/TextOverlayExp.java +++ b/src/org/oscim/renderer/overlays/TextOverlayExp.java @@ -179,7 +179,7 @@ public class TextOverlayExp extends BasicOverlay { if (lp.text == ti.text && (lp.string == ti.string || lp.string.equals(ti.string))) { - // make strings unique + // make strings unique, should be done only once.. ti.string = lp.string; // keep the label that was active earlier @@ -358,8 +358,8 @@ public class TextOverlayExp extends BasicOverlay { if (!l.text.caption) { // set line endpoints relative to view to be able to // check intersections with label from other tiles - float width = (l.x2 - l.x1) / 2f; - float height = (l.y2 - l.y1) / 2f; + float width = (l.item.x2 - l.item.x1) / 2f; + float height = (l.item.y2 - l.item.y1) / 2f; l.x2 = (l.x + width); l.x1 = (l.x - width);