From 347975349a9fae3e5e0be6abf221e6daea5b2617 Mon Sep 17 00:00:00 2001 From: sonora Date: Thu, 29 Dec 2016 16:07:58 +0100 Subject: [PATCH] clean up --- .../net/osmand/plus/views/MultiTouchSupport.java | 14 +++++++------- .../net/osmand/plus/views/OsmandMapTileView.java | 3 +-- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/views/MultiTouchSupport.java b/OsmAnd/src/net/osmand/plus/views/MultiTouchSupport.java index 0e36ae4089..294969774b 100644 --- a/OsmAnd/src/net/osmand/plus/views/MultiTouchSupport.java +++ b/OsmAnd/src/net/osmand/plus/views/MultiTouchSupport.java @@ -88,7 +88,6 @@ public class MultiTouchSupport { if(inZoomMode){ listener.onZoomOrRotationEnded(zoomRelative, angleRelative); inZoomMode = false; - //return true; } return false; } @@ -111,12 +110,13 @@ public class MultiTouchSupport { angleStarted = angle; inZoomMode = true; return true; - } else if(actionCode == ACTION_POINTER_UP){ - if(inZoomMode){ - listener.onZoomOrRotationEnded(zoomRelative, angleRelative); - inZoomMode = false; - } - return true; + // End only on second-last pointer up, see above + //} else if(actionCode == ACTION_POINTER_UP){ + // if(inZoomMode){ + // listener.onZoomOrRotationEnded(zoomRelative, angleRelative); + // inZoomMode = false; + // } + // return true; } else if(inZoomMode && actionCode == MotionEvent.ACTION_MOVE){ if(angleDefined) { angleRelative = MapUtils.unifyRotationTo360(angle - angleStarted); diff --git a/OsmAnd/src/net/osmand/plus/views/OsmandMapTileView.java b/OsmAnd/src/net/osmand/plus/views/OsmandMapTileView.java index 7409acb4a4..20d20e652e 100644 --- a/OsmAnd/src/net/osmand/plus/views/OsmandMapTileView.java +++ b/OsmAnd/src/net/osmand/plus/views/OsmandMapTileView.java @@ -861,9 +861,8 @@ public class OsmandMapTileView implements IMapDownloaderCallback { for (int i = layers.size() - 1; i >= 0; i--) { layers.get(i).onTouchEvent(event, getCurrentRotatedTileBox()); } -// gestureDetector.onTouchEvent(event); + gestureDetector.onTouchEvent(event); } - gestureDetector.onTouchEvent(event); return true; }