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
public void clearAllOnClick() {
editingCtx.getCommandManager().execute(new ClearPointsCommand(measurementLayer));
editingCtx.clearSegments();
editingCtx.cancelSnapToRoad();
if (pointsListOpened) {
hidePointsList();

View file

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