Fix move point
This commit is contained in:
parent
16ada8b290
commit
4b23255899
2 changed files with 12 additions and 12 deletions
|
@ -607,7 +607,6 @@ public class MeasurementToolFragment extends Fragment {
|
|||
public void moveOnClick() {
|
||||
if (measurementLayer != null) {
|
||||
measurementLayer.enterMovingPointMode();
|
||||
editingCtx.splitSegments(editingCtx.getSelectedPointPosition());
|
||||
}
|
||||
switchMovePointMode(true);
|
||||
}
|
||||
|
|
|
@ -112,16 +112,16 @@ public class MeasurementToolLayer extends OsmandMapLayer implements ContextMenuL
|
|||
|
||||
@Override
|
||||
public boolean onSingleTap(PointF point, RotatedTileBox tileBox) {
|
||||
if (singleTapListener != null) {
|
||||
if (inMeasurementMode
|
||||
&& !editingCtx.isInMovePointMode()
|
||||
&& !editingCtx.isInAddPointBeforeMode()
|
||||
&& !editingCtx.isInAddPointAfterMode()) {
|
||||
if (!overlapped) {
|
||||
selectPoint(point.x, point.y, true);
|
||||
}
|
||||
if (editingCtx.getSelectedPointPosition() == -1) {
|
||||
pressedPointLatLon = tileBox.getLatLonFromPixel(point.x, point.y);
|
||||
if (inMeasurementMode
|
||||
&& !editingCtx.isInMovePointMode()
|
||||
&& !editingCtx.isInAddPointBeforeMode()
|
||||
&& !editingCtx.isInAddPointAfterMode()) {
|
||||
if (!overlapped) {
|
||||
selectPoint(point.x, point.y, true);
|
||||
}
|
||||
if (editingCtx.getSelectedPointPosition() == -1) {
|
||||
pressedPointLatLon = tileBox.getLatLonFromPixel(point.x, point.y);
|
||||
if (singleTapListener != null) {
|
||||
singleTapListener.onAddPoint();
|
||||
}
|
||||
}
|
||||
|
@ -143,7 +143,7 @@ public class MeasurementToolLayer extends OsmandMapLayer implements ContextMenuL
|
|||
selectPoint(point.x, point.y, false);
|
||||
if (editingCtx.getSelectedPointPosition() != -1) {
|
||||
enterMovingPointMode();
|
||||
if (inMeasurementMode && enterMovePointModeListener != null) {
|
||||
if (enterMovePointModeListener != null) {
|
||||
enterMovePointModeListener.onEnterMovePointMode();
|
||||
}
|
||||
}
|
||||
|
@ -157,6 +157,7 @@ public class MeasurementToolLayer extends OsmandMapLayer implements ContextMenuL
|
|||
moveMapToPoint(editingCtx.getSelectedPointPosition());
|
||||
WptPt pt = editingCtx.getPoints().remove(editingCtx.getSelectedPointPosition());
|
||||
editingCtx.setOriginalPointToMove(pt);
|
||||
editingCtx.splitSegments(editingCtx.getSelectedPointPosition());
|
||||
}
|
||||
|
||||
void enterAddingPointAfterMode() {
|
||||
|
|
Loading…
Reference in a new issue