Subject: [PATCH] Fix FastDraw crash when removing the last point of a polygon
---
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
diff --git a/src/org/openstreetmap/josm/plugins/fastdraw/DrawnPolyLine.java b/src/org/openstreetmap/josm/plugins/fastdraw/DrawnPolyLine.java
a
|
b
|
|
239 | 239 | } |
240 | 240 | |
241 | 241 | void deleteNode(int idx) { |
242 | | if (idx <= lastIdx) lastIdx--; |
| 242 | if (isClosed()){ |
| 243 | if (idx == 0) idx = getPointCount() - 1; |
| 244 | if (idx == getPointCount() - 1) closedFlag = false; |
| 245 | } |
| 246 | if (idx <= lastIdx && lastIdx != 0) lastIdx--; |
243 | 247 | fixed.remove(points.get(idx)); |
244 | 248 | points.remove(idx); |
245 | 249 | } |