From c64538acc51c05927b129c247c69d870ea8545c0 Mon Sep 17 00:00:00 2001 From: PavelRatushny Date: Wed, 12 Jul 2017 10:39:51 +0300 Subject: [PATCH] Fix adapter count --- OsmAnd/src/net/osmand/plus/myplaces/TrackSegmentFragment.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/myplaces/TrackSegmentFragment.java b/OsmAnd/src/net/osmand/plus/myplaces/TrackSegmentFragment.java index 2c390f47c4..d3665663d4 100644 --- a/OsmAnd/src/net/osmand/plus/myplaces/TrackSegmentFragment.java +++ b/OsmAnd/src/net/osmand/plus/myplaces/TrackSegmentFragment.java @@ -365,7 +365,7 @@ public class TrackSegmentFragment extends OsmAndListFragment { boolean hasPath = false; if (getGpx() != null) { - if (getGpx().showCurrentTrack && adapter.getCount() > 0) { + if (getGpx().showCurrentTrack) { hasPath = false; } else if (getGpx().tracks.size() > 0 || getGpx().routes.size() > 0) { hasPath = true; @@ -427,7 +427,7 @@ public class TrackSegmentFragment extends OsmAndListFragment { } if (hasPath) { - if (getGpx() != null && !getGpx().showCurrentTrack) { + if (getGpx() != null && !getGpx().showCurrentTrack && adapter.getCount() > 0) { prepareSplitIntervalAdapterData(); setupSplitIntervalView(splitIntervalView); updateSplitIntervalView(splitIntervalView);