Fix clear points command

This commit is contained in:
Alexander Sytnyk 2017-08-25 15:11:33 +03:00
parent b6893b4b46
commit fe196a0f67
2 changed files with 1 additions and 1 deletions

View file

@ -595,7 +595,6 @@ public class MeasurementToolFragment extends Fragment {
@Override @Override
public void clearAllOnClick() { public void clearAllOnClick() {
editingCtx.getCommandManager().execute(new ClearPointsCommand(measurementLayer)); editingCtx.getCommandManager().execute(new ClearPointsCommand(measurementLayer));
editingCtx.clearSegments();
editingCtx.cancelSnapToRoad(); editingCtx.cancelSnapToRoad();
if (pointsListOpened) { if (pointsListOpened) {
hidePointsList(); hidePointsList();

View file

@ -19,6 +19,7 @@ public class ClearPointsCommand extends MeasurementModeCommand {
List<WptPt> pts = measurementLayer.getEditingCtx().getPoints(); List<WptPt> pts = measurementLayer.getEditingCtx().getPoints();
points = new LinkedList<>(pts); points = new LinkedList<>(pts);
pts.clear(); pts.clear();
measurementLayer.getEditingCtx().clearSegments();
measurementLayer.refreshMap(); measurementLayer.refreshMap();
return true; return true;
} }