Fix clear points command
This commit is contained in:
parent
b6893b4b46
commit
fe196a0f67
2 changed files with 1 additions and 1 deletions
|
@ -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();
|
||||||
|
|
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue