Issue #2967 fix error when erasing the last piece of a telestrator line
Change-Id: I51a3a07848dfa8639f553f86a831f15e9965bf84 Former-commit-id:a01cafd845
[formerly0498ff757b
] [formerly4d0b0495fe
] [formerly4d0b0495fe
[formerly3e6de492ec
]] [formerly6b3504a39c
[formerly4d0b0495fe
[formerly3e6de492ec
] [formerly6b3504a39c
[formerly d152fa62494ae9b2880a94de92587df0db1bad6c]]]] Former-commit-id:6b3504a39c
Former-commit-id: f522522b38d47480e1a1f710143a4b36f9d4c3d6 [formerly 3de3bf102a92af52452844e38c9dbcaa83cb90c3] [formerly64731a98cb
[formerly64dde02001
]] Former-commit-id:64731a98cb
Former-commit-id:5059473b5e
This commit is contained in:
parent
f523e4d700
commit
562268e5fc
1 changed files with 5 additions and 2 deletions
|
@ -64,6 +64,7 @@ import com.vividsolutions.jts.geom.TopologyException;
|
|||
* ------------- -------- ----------- --------------------------
|
||||
* May 23, 2012 mschenke Initial creation
|
||||
* May 23, 2012 2646 bsteffen Fix NPE in project.
|
||||
* Apr 03, 2014 2967 njensen Fix error when erasing the last part of a line
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -266,8 +267,10 @@ public class DrawingToolLayer implements IRenderable {
|
|||
// To avoid self intersecting lines, this
|
||||
// will split the difference geometry
|
||||
Coordinate[] coords = diff.getCoordinates();
|
||||
diff = diff.union(factory
|
||||
.createPoint(coords[0]));
|
||||
if (coords != null && coords.length > 0) {
|
||||
diff = diff.union(factory
|
||||
.createPoint(coords[0]));
|
||||
}
|
||||
}
|
||||
// Add diff to newGeoms
|
||||
flattenGeometry(diff, newGeoms);
|
||||
|
|
Loading…
Add table
Reference in a new issue