From cf72584aba0fa79bcca21891d215f8885dabcf64 Mon Sep 17 00:00:00 2001 From: Vitaliy Date: Mon, 13 Jan 2020 13:01:02 +0200 Subject: [PATCH] Fix joined segments drawing for disabled track --- .../osmand/plus/myplaces/TrackActivityFragmentAdapter.java | 2 +- OsmAnd/src/net/osmand/plus/myplaces/TrackBitmapDrawer.java | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/OsmAnd/src/net/osmand/plus/myplaces/TrackActivityFragmentAdapter.java b/OsmAnd/src/net/osmand/plus/myplaces/TrackActivityFragmentAdapter.java index f6c62bdbe1..b645e9b6ac 100644 --- a/OsmAnd/src/net/osmand/plus/myplaces/TrackActivityFragmentAdapter.java +++ b/OsmAnd/src/net/osmand/plus/myplaces/TrackActivityFragmentAdapter.java @@ -250,7 +250,7 @@ public class TrackActivityFragmentAdapter implements TrackBitmapDrawerListener { private void refreshTrackBitmap() { TrackBitmapDrawer trackDrawer = getTrackBitmapDrawer(); if (trackDrawer != null) { - getTrackBitmapDrawer().refreshTrackBitmap(); + trackDrawer.refreshTrackBitmap(); } } diff --git a/OsmAnd/src/net/osmand/plus/myplaces/TrackBitmapDrawer.java b/OsmAnd/src/net/osmand/plus/myplaces/TrackBitmapDrawer.java index d84361eb80..98efb29dba 100644 --- a/OsmAnd/src/net/osmand/plus/myplaces/TrackBitmapDrawer.java +++ b/OsmAnd/src/net/osmand/plus/myplaces/TrackBitmapDrawer.java @@ -210,6 +210,10 @@ public class TrackBitmapDrawer { sf = app.getSelectedGpxHelper().getSelectedFileByPath(gpxFile.path); if (sf == null) { sf = new GpxSelectionHelper.SelectedGpxFile(); + GpxDataItem gpxDataItem = getGpxDataItem(); + if (gpxDataItem != null) { + sf.setJoinSegments(gpxDataItem.isJoinSegments()); + } } sf.setGpxFile(gpxFile, app); }