try fix issue 1928

This commit is contained in:
sonora 2013-06-11 22:02:02 +02:00
parent 53eec6ebef
commit e0c64e0ca8
2 changed files with 4 additions and 4 deletions

View file

@ -1063,7 +1063,7 @@ public class OsmandSettings {
return settingsAPI.edit(globalPreferences).remove(INTERMEDIATE_POINTS).commit();
}
public List<String> getIntermediatePointDescriptions(int sz) {
public List<String> getIntermediatePointDescriptions() {
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(ps.size());
List<String> ds = getIntermediatePointDescriptions();
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(ps.size());
List<String> ds = getIntermediatePointDescriptions();
ps.remove(index);
ds.remove(index);
return saveIntermediatePoints(ps,ds);

View file

@ -31,7 +31,7 @@ public class TargetPointsHelper {
intermediatePoints.clear();
intermediatePointNames.clear();
intermediatePoints.addAll(settings.getIntermediatePoints());
intermediatePointNames.addAll(settings.getIntermediatePointDescriptions(intermediatePoints.size()));
intermediatePointNames.addAll(settings.getIntermediatePointDescriptions());
}
public LatLon getPointToNavigate() {