Test adding split from database
This commit is contained in:
parent
941109a045
commit
397d0a757e
2 changed files with 17 additions and 0 deletions
|
@ -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<GpxDataItem> 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<GpxSelectionHelper.GpxDisplayGroup> groups = context.getSelectedGpxHelper().collectDisplayGroups(gpxFile);
|
||||
for (GpxSelectionHelper.GpxDisplayGroup group : groups) {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public GpxDataItem getItem(File file) {
|
||||
GpxDataItem result = null;
|
||||
SQLiteConnection db = openConnection(true);
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue