Issue #1424 Removed coordinate truncate when adding vertex.

Former-commit-id: 8e83a6ea6d [formerly ccc37dc454] [formerly 351148804c [formerly 5531ffd29021d7e0db627f2c59ad7ef6de71a896]]
Former-commit-id: 351148804c
Former-commit-id: 61f80591bb
This commit is contained in:
Jonathan Sanchez 2012-12-14 07:42:39 -06:00
parent bf7960b5f9
commit c4e044d7b9

View file

@ -80,14 +80,14 @@ public class WarngenUIManager extends InputAdapter {
private int movePointIndex = -1; private int movePointIndex = -1;
private WarngenLayer warngenLayer; private final WarngenLayer warngenLayer;
// Cursor // Cursor
private Cursor movePolygon; private final Cursor movePolygon;
private Cursor movePoint; private final Cursor movePoint;
private Cursor arrow; private final Cursor arrow;
/** The last mouse position - x */ /** The last mouse position - x */
private int lastMouseX; private int lastMouseX;
@ -420,7 +420,7 @@ public class WarngenUIManager extends InputAdapter {
GeometryFactory gf = new GeometryFactory(); GeometryFactory gf = new GeometryFactory();
List<Coordinate> coordList = new ArrayList<Coordinate>(); List<Coordinate> coordList = new ArrayList<Coordinate>();
List<Coordinate> alreadyRemoved = new ArrayList<Coordinate>(); List<Coordinate> alreadyRemoved = new ArrayList<Coordinate>();
for (int i = 0; i < coords.length; ++i) { for (int i = 0; i < coords.length; ++i) {
Coordinate toAdd = (Coordinate) coords[i].clone(); Coordinate toAdd = (Coordinate) coords[i].clone();
if (!toAdd.equals(toRemove) if (!toAdd.equals(toRemove)
@ -541,7 +541,6 @@ public class WarngenUIManager extends InputAdapter {
} }
Coordinate c = new Coordinate(lastMouseX, lastMouseY); Coordinate c = new Coordinate(lastMouseX, lastMouseY);
PolygonUtil.truncate(c, 2);
Polygon poly = warngenLayer.getPolygon(); Polygon poly = warngenLayer.getPolygon();
if (StormTrackUIManager.getCoordinateIndex(warngenLayer, if (StormTrackUIManager.getCoordinateIndex(warngenLayer,
@ -572,7 +571,6 @@ public class WarngenUIManager extends InputAdapter {
Coordinate coLinearCoord = container.translateClick( Coordinate coLinearCoord = container.translateClick(
coLinearPoint.getX(), coLinearPoint.getY()); coLinearPoint.getX(), coLinearPoint.getY());
PolygonUtil.truncate(coLinearCoord, 2);
Coordinate[] coords2 = new Coordinate[coords.length + 1]; Coordinate[] coords2 = new Coordinate[coords.length + 1];
int k = 0; int k = 0;
for (k = 0; k < i; k++) { for (k = 0; k < i; k++) {