diff --git a/OsmAnd/src/net/osmand/plus/GPXDatabase.java b/OsmAnd/src/net/osmand/plus/GPXDatabase.java index c3539cd40f..6272e35343 100644 --- a/OsmAnd/src/net/osmand/plus/GPXDatabase.java +++ b/OsmAnd/src/net/osmand/plus/GPXDatabase.java @@ -2,6 +2,7 @@ package net.osmand.plus; import net.osmand.IndexConstants; import net.osmand.plus.GPXUtilities.GPXTrackAnalysis; +import net.osmand.plus.activities.TrackActivity; import net.osmand.plus.api.SQLiteAPI.SQLiteConnection; import net.osmand.plus.api.SQLiteAPI.SQLiteCursor; import net.osmand.util.Algorithms; @@ -405,6 +406,21 @@ public class GPXDatabase { return items; } + public void processSplit() { + List items = getItems(); + for (GpxDataItem dataItem : items) { + GpxSelectionHelper gpxSelectionHelper = context.getSelectedGpxHelper(); + GpxSelectionHelper.SelectedGpxFile selectedGpxFile = gpxSelectionHelper.getSelectedFileByPath(dataItem.file.getAbsolutePath()); + if (selectedGpxFile != null && selectedGpxFile.getGpxFile() != null) { + GPXUtilities.GPXFile gpxFile = selectedGpxFile.getGpxFile(); + List groups = context.getSelectedGpxHelper().collectDisplayGroups(gpxFile); + for (GpxSelectionHelper.GpxDisplayGroup group : groups) { + + } + } + } + } + public GpxDataItem getItem(File file) { GpxDataItem result = null; SQLiteConnection db = openConnection(true); diff --git a/OsmAnd/src/net/osmand/plus/views/GPXLayer.java b/OsmAnd/src/net/osmand/plus/views/GPXLayer.java index 56ecb6ed85..23dfa99436 100644 --- a/OsmAnd/src/net/osmand/plus/views/GPXLayer.java +++ b/OsmAnd/src/net/osmand/plus/views/GPXLayer.java @@ -107,6 +107,7 @@ public class GPXLayer extends OsmandMapLayer implements ContextMenuLayer.IContex this.view = view; selectedGpxHelper = view.getApplication().getSelectedGpxHelper(); osmandRenderer = view.getApplication().getResourceManager().getRenderer().getRenderer(); + view.getApplication().getGpxDatabase().processSplit(); initUI(); }