try fix issue 1928
This commit is contained in:
parent
53eec6ebef
commit
e0c64e0ca8
2 changed files with 4 additions and 4 deletions
|
@ -1063,7 +1063,7 @@ public class OsmandSettings {
|
||||||
return settingsAPI.edit(globalPreferences).remove(INTERMEDIATE_POINTS).commit();
|
return settingsAPI.edit(globalPreferences).remove(INTERMEDIATE_POINTS).commit();
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<String> getIntermediatePointDescriptions(int sz) {
|
public List<String> getIntermediatePointDescriptions() {
|
||||||
List<String> list = new ArrayList<String>();
|
List<String> list = new ArrayList<String>();
|
||||||
String ip = settingsAPI.getString(globalPreferences,INTERMEDIATE_POINTS_DESCRIPTION, "");
|
String ip = settingsAPI.getString(globalPreferences,INTERMEDIATE_POINTS_DESCRIPTION, "");
|
||||||
if (ip.trim().length() > 0) {
|
if (ip.trim().length() > 0) {
|
||||||
|
@ -1099,7 +1099,7 @@ public class OsmandSettings {
|
||||||
public boolean insertIntermediatePoint(double latitude, double longitude, String historyDescription, int index,
|
public boolean insertIntermediatePoint(double latitude, double longitude, String historyDescription, int index,
|
||||||
boolean navigate) {
|
boolean navigate) {
|
||||||
List<LatLon> ps = getIntermediatePoints();
|
List<LatLon> ps = getIntermediatePoints();
|
||||||
List<String> ds = getIntermediatePointDescriptions(ps.size());
|
List<String> ds = getIntermediatePointDescriptions();
|
||||||
ps.add(index, new LatLon(latitude, longitude));
|
ps.add(index, new LatLon(latitude, longitude));
|
||||||
ds.add(index, historyDescription);
|
ds.add(index, historyDescription);
|
||||||
if(navigate) {
|
if(navigate) {
|
||||||
|
@ -1112,7 +1112,7 @@ public class OsmandSettings {
|
||||||
}
|
}
|
||||||
public boolean deleteIntermediatePoint( int index) {
|
public boolean deleteIntermediatePoint( int index) {
|
||||||
List<LatLon> ps = getIntermediatePoints();
|
List<LatLon> ps = getIntermediatePoints();
|
||||||
List<String> ds = getIntermediatePointDescriptions(ps.size());
|
List<String> ds = getIntermediatePointDescriptions();
|
||||||
ps.remove(index);
|
ps.remove(index);
|
||||||
ds.remove(index);
|
ds.remove(index);
|
||||||
return saveIntermediatePoints(ps,ds);
|
return saveIntermediatePoints(ps,ds);
|
||||||
|
|
|
@ -31,7 +31,7 @@ public class TargetPointsHelper {
|
||||||
intermediatePoints.clear();
|
intermediatePoints.clear();
|
||||||
intermediatePointNames.clear();
|
intermediatePointNames.clear();
|
||||||
intermediatePoints.addAll(settings.getIntermediatePoints());
|
intermediatePoints.addAll(settings.getIntermediatePoints());
|
||||||
intermediatePointNames.addAll(settings.getIntermediatePointDescriptions(intermediatePoints.size()));
|
intermediatePointNames.addAll(settings.getIntermediatePointDescriptions());
|
||||||
}
|
}
|
||||||
|
|
||||||
public LatLon getPointToNavigate() {
|
public LatLon getPointToNavigate() {
|
||||||
|
|
Loading…
Reference in a new issue