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