Add gpx wptpt editor current track
This commit is contained in:
parent
59e4284d00
commit
62a792952b
2 changed files with 14 additions and 1 deletions
|
@ -533,6 +533,11 @@ public class SavingTrackHelper extends SQLiteOpenHelper {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void updatePointData(WptPt pt, double lat, double lon, long time, String description, String name, String category, int color) {
|
public void updatePointData(WptPt pt, double lat, double lon, long time, String description, String name, String category, int color) {
|
||||||
|
updatePointData(pt, lat, lon, time, description, name, category, color, null, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void updatePointData(WptPt pt, double lat, double lon, long time, String description, String name,
|
||||||
|
String category, int color, String iconName, String iconBackground) {
|
||||||
currentTrack.getModifiableGpxFile().modifiedTime = time;
|
currentTrack.getModifiableGpxFile().modifiedTime = time;
|
||||||
|
|
||||||
List<Object> params = new ArrayList<>();
|
List<Object> params = new ArrayList<>();
|
||||||
|
@ -594,6 +599,12 @@ public class SavingTrackHelper extends SQLiteOpenHelper {
|
||||||
if (color != 0) {
|
if (color != 0) {
|
||||||
pt.setColor(color);
|
pt.setColor(color);
|
||||||
}
|
}
|
||||||
|
if (iconName != null) {
|
||||||
|
pt.setIconName(iconName);
|
||||||
|
}
|
||||||
|
if (iconBackground != null) {
|
||||||
|
pt.setBackgroundType(iconBackground);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void deletePointData(WptPt pt) {
|
public void deletePointData(WptPt pt) {
|
||||||
|
|
|
@ -248,6 +248,8 @@ public class WptPtEditorFragmentNew extends PointEditorFragmentNew {
|
||||||
} else {
|
} else {
|
||||||
wpt.removeColor();
|
wpt.removeColor();
|
||||||
}
|
}
|
||||||
|
wpt.setBackgroundType(backgroundTypeName);
|
||||||
|
wpt.setIconName(iconName);
|
||||||
GPXFile gpx = editor.getGpxFile();
|
GPXFile gpx = editor.getGpxFile();
|
||||||
SavingTrackHelper savingTrackHelper = getSavingTrackHelper();
|
SavingTrackHelper savingTrackHelper = getSavingTrackHelper();
|
||||||
GpxSelectionHelper selectedGpxHelper = getSelectedGpxHelper();
|
GpxSelectionHelper selectedGpxHelper = getSelectedGpxHelper();
|
||||||
|
@ -287,7 +289,7 @@ public class WptPtEditorFragmentNew extends PointEditorFragmentNew {
|
||||||
if (gpx != null) {
|
if (gpx != null) {
|
||||||
if (gpx.showCurrentTrack) {
|
if (gpx.showCurrentTrack) {
|
||||||
savingTrackHelper.updatePointData(wpt, wpt.getLatitude(), wpt.getLongitude(),
|
savingTrackHelper.updatePointData(wpt, wpt.getLatitude(), wpt.getLongitude(),
|
||||||
System.currentTimeMillis(), description, name, category, color);
|
System.currentTimeMillis(), description, name, category, color, iconName, backgroundTypeName);
|
||||||
if (!editor.isGpxSelected()) {
|
if (!editor.isGpxSelected()) {
|
||||||
selectedGpxHelper.setGpxFileToDisplay(gpx);
|
selectedGpxHelper.setGpxFileToDisplay(gpx);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue