Fix joined segments drawing for disabled track

This commit is contained in:
Vitaliy 2020-01-13 13:01:02 +02:00
parent 127645eb44
commit cf72584aba
2 changed files with 5 additions and 1 deletions

View file

@ -250,7 +250,7 @@ public class TrackActivityFragmentAdapter implements TrackBitmapDrawerListener {
private void refreshTrackBitmap() { private void refreshTrackBitmap() {
TrackBitmapDrawer trackDrawer = getTrackBitmapDrawer(); TrackBitmapDrawer trackDrawer = getTrackBitmapDrawer();
if (trackDrawer != null) { if (trackDrawer != null) {
getTrackBitmapDrawer().refreshTrackBitmap(); trackDrawer.refreshTrackBitmap();
} }
} }

View file

@ -210,6 +210,10 @@ public class TrackBitmapDrawer {
sf = app.getSelectedGpxHelper().getSelectedFileByPath(gpxFile.path); sf = app.getSelectedGpxHelper().getSelectedFileByPath(gpxFile.path);
if (sf == null) { if (sf == null) {
sf = new GpxSelectionHelper.SelectedGpxFile(); sf = new GpxSelectionHelper.SelectedGpxFile();
GpxDataItem gpxDataItem = getGpxDataItem();
if (gpxDataItem != null) {
sf.setJoinSegments(gpxDataItem.isJoinSegments());
}
} }
sf.setGpxFile(gpxFile, app); sf.setGpxFile(gpxFile, app);
} }