Fix "Double zoom in / out visibility"

This commit is contained in:
nazar-kutz 2021-03-09 15:38:11 +02:00
parent 5b08660b5e
commit ca72d8f5d6

View file

@ -876,10 +876,13 @@ public class MapControlsLayer extends OsmandMapLayer {
routePlanningBtn.updateVisibility(showBottomMenuButtons);
menuControl.updateVisibility(showBottomMenuButtons);
boolean additionalDialogsHide = !isInGpxApproximationMode()
&& !isInTrackAppearanceMode()
&& !isInChoosingRoutesMode()
&& !isInWaypointsChoosingMode();
boolean showZoomButtons = !routeDialogOpened && !shouldHideTopControls
&& !isInFollowTrackMode()
&& (!isInGpxApproximationMode() || !isInTrackAppearanceMode()
|| !isInChoosingRoutesMode() || !isInWaypointsChoosingMode() || !portrait);
&& (additionalDialogsHide || !portrait);
mapZoomIn.updateVisibility(showZoomButtons);
mapZoomOut.updateVisibility(showZoomButtons);
@ -1021,9 +1024,14 @@ public class MapControlsLayer extends OsmandMapLayer {
public void updateMyLocationVisibility(MapHudButton backToLocationControl, RoutingHelper rh, boolean dialogOpened) {
boolean tracked = mapActivity.getMapViewTrackingUtilities().isMapLinkedToLocation();
boolean visible = !(tracked && rh.isFollowingMode()) && (!isInGpxApproximationMode() || !isPotrait());
boolean visible = !(tracked && rh.isFollowingMode());
boolean additionalDialogsHide = !isInTrackAppearanceMode()
&& !isInGpxApproximationMode()
&& !isInChoosingRoutesMode()
&& !isInWaypointsChoosingMode()
&& !isInFollowTrackMode();
backToLocationControl.updateVisibility(visible && !dialogOpened && !isInPlanRouteMode()
&& (!isInTrackAppearanceMode() || !isInChoosingRoutesMode() || !isInWaypointsChoosingMode() || !isInFollowTrackMode() || !isPotrait()));
&& (additionalDialogsHide || !isPotrait()));
}
public boolean onSingleTap(PointF point, RotatedTileBox tileBox) {