Fix intermediate points dialog

This commit is contained in:
Victor Shcherb 2013-08-11 01:10:52 +02:00
parent a1f7c9f310
commit 2bbfea5917

View file

@ -3,6 +3,7 @@ package net.osmand.plus.activities;
import gnu.trove.list.array.TIntArrayList; import gnu.trove.list.array.TIntArrayList;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays;
import java.util.List; import java.util.List;
import net.osmand.TspAnt; import net.osmand.TspAnt;
@ -52,6 +53,7 @@ public class IntermediatePointsDialog {
} }
final List<String> names = targets.getIntermediatePointNamesWithTarget(); final List<String> names = targets.getIntermediatePointNamesWithTarget();
final boolean[] checkedIntermediates = new boolean[intermediates.size()]; final boolean[] checkedIntermediates = new boolean[intermediates.size()];
Arrays.fill(checkedIntermediates, true);
final ArrayAdapter<LatLon> listadapter = getListAdapter(app, activity, changeOrder, intermediates, originalPositions, names, checkedIntermediates); final ArrayAdapter<LatLon> listadapter = getListAdapter(app, activity, changeOrder, intermediates, originalPositions, names, checkedIntermediates);
ListView lv = new ListView(activity); ListView lv = new ListView(activity);
View contentView = lv; View contentView = lv;
@ -211,7 +213,6 @@ public class IntermediatePointsDialog {
nm += "\n" + descr; nm += "\n" + descr;
} }
tv.setText(nm); tv.setText(nm);
checkedIntermediates[position] = true;
if (changeOrder) { if (changeOrder) {
((ImageButton) v.findViewById(R.id.up)).setOnClickListener(new View.OnClickListener(){ ((ImageButton) v.findViewById(R.id.up)).setOnClickListener(new View.OnClickListener(){
@Override @Override