clean up status conditions

This commit is contained in:
sonora 2016-12-27 16:55:44 +01:00
parent 76637eba5a
commit a45428f006
2 changed files with 3 additions and 1 deletions

View file

@ -88,6 +88,7 @@ public class MultiTouchSupport {
if(pointCount < 2){ if(pointCount < 2){
if(inZoomMode){ if(inZoomMode){
listener.onZoomOrRotationEnded(zoomRelative, angleRelative); listener.onZoomOrRotationEnded(zoomRelative, angleRelative);
inZoomMode = false;
} }
return false; return false;
} }

View file

@ -858,9 +858,10 @@ public class OsmandMapTileView implements IMapDownloaderCallback {
for (int i = layers.size() - 1; i >= 0; i--) { for (int i = layers.size() - 1; i >= 0; i--) {
layers.get(i).onTouchEvent(event, getCurrentRotatedTileBox()); layers.get(i).onTouchEvent(event, getCurrentRotatedTileBox());
} }
final boolean wasMultiTouchinZoomMode = multiTouchSupport.isInZoomMode();
final boolean isMultiTouch = multiTouchSupport.onTouchEvent(event); final boolean isMultiTouch = multiTouchSupport.onTouchEvent(event);
doubleTapScaleDetector.onTouchEvent(event); doubleTapScaleDetector.onTouchEvent(event);
if (!isMultiTouch && !multiTouchSupport.isInZoomMode() && !doubleTapScaleDetector.isInZoomMode()) { if (!isMultiTouch && !wasMultiTouchZoomMode && !doubleTapScaleDetector.isInZoomMode()) {
gestureDetector.onTouchEvent(event); gestureDetector.onTouchEvent(event);
} }
return true; return true;