Insert in proper position

This commit is contained in:
fullwall 2020-10-12 20:45:47 +08:00
parent 1d314fba7a
commit 6a3382c5ce

View File

@ -324,10 +324,10 @@ public class LinearWaypointProvider implements EnumerableWaypointProvider {
Waypoint element = new Waypoint(at);
normaliseEditingSlot();
if (editingSlot == waypoints.size()) {
if (editingSlot + 1 >= waypoints.size()) {
waypoints.add(element);
} else {
waypoints.add(editingSlot, element);
waypoints.add(editingSlot + 1, element);
}
if (showPath) {
markers.createMarker(element, element.getLocation().clone().add(0, 1, 0));