Fix follow track visibility for already visible tracks
This commit is contained in:
parent
1783796e59
commit
6294234e54
2 changed files with 8 additions and 1 deletions
|
@ -116,6 +116,10 @@ public class GpxSelectionHelper {
|
|||
}
|
||||
}
|
||||
|
||||
public boolean shouldHideTrackToFollow() {
|
||||
return shouldHideTrackToFollow;
|
||||
}
|
||||
|
||||
private StateChangedListener<String> getFollowTrackListener() {
|
||||
if (followTrackListener == null) {
|
||||
followTrackListener = new StateChangedListener<String>() {
|
||||
|
|
|
@ -724,8 +724,11 @@ public class GPXLayer extends OsmandMapLayer implements IContextMenuProvider, IM
|
|||
private boolean showTrackToFollow() {
|
||||
if (view.getContext() instanceof MapActivity) {
|
||||
MapActivity mapActivity = (MapActivity) view.getContext();
|
||||
OsmandApplication app = mapActivity.getMyApplication();
|
||||
MapRouteInfoMenu routeInfoMenu = mapActivity.getMapRouteInfoMenu();
|
||||
return routeInfoMenu.isVisible() || mapActivity.getRoutingHelper().isFollowingMode()
|
||||
return !app.getSelectedGpxHelper().shouldHideTrackToFollow()
|
||||
|| routeInfoMenu.isVisible()
|
||||
|| app.getRoutingHelper().isFollowingMode()
|
||||
|| MapRouteInfoMenu.followTrackVisible
|
||||
|| MapRouteInfoMenu.chooseRoutesVisible
|
||||
|| MapRouteInfoMenu.waypointsVisible;
|
||||
|
|
Loading…
Reference in a new issue