From 44d26dd3081e1d6d109b165553897460b1c03692 Mon Sep 17 00:00:00 2001 From: sonora Date: Tue, 29 Oct 2013 01:13:06 +0100 Subject: [PATCH] fix small bug with magnifier display --- OsmAnd/src/net/osmand/plus/views/MapControlsLayer.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/views/MapControlsLayer.java b/OsmAnd/src/net/osmand/plus/views/MapControlsLayer.java index 511ac5065c..dc16b17034 100644 --- a/OsmAnd/src/net/osmand/plus/views/MapControlsLayer.java +++ b/OsmAnd/src/net/osmand/plus/views/MapControlsLayer.java @@ -207,13 +207,15 @@ public class MapControlsLayer extends OsmandMapLayer { if (frac != 0) { if (frac > 0) { zoomText += "+"; + } else { + zoomText += "-"; } - int ifrac = ((int) frac); + int ifrac = ((int) Math.abs(frac)); if (frac >= 1) { zoomText += ifrac; } if (frac != ifrac) { - zoomText += "." + ((int) ((frac - ifrac) * 10f)); + zoomText += "." + ((int) ((Math.abs(frac) - ifrac) * 10f)); } } float length = zoomTextPaint.measureText(zoomText);