Ticket #2179: PotlatchDrawing FixRandomAborts.patch
| File PotlatchDrawing FixRandomAborts.patch, 1.4 KB (added by , 17 years ago) |
|---|
-
src/org/openstreetmap/josm/actions/mapmode/DrawAction.java
73 73 private boolean drawTargetHighlight; 74 74 private boolean drawTargetCursor; 75 75 private Point mousePos; 76 private Point oldMousePos; 76 77 private Color selectedColor; 77 78 78 79 private Node currentBaseNode; … … 246 247 return; 247 248 if(!Main.map.mapView.isDrawableLayer()) 248 249 return; 249 if(e.getClickCount() > 1) { 250 251 if(e.getClickCount() > 1 && mousePos != null && mousePos.equals(oldMousePos)) { 250 252 // A double click equals "user clicked last node again, finish way" 253 // Change draw tool only if mouse position is nearly the same, as 254 // otherwise fast clicks will count as a double click 251 255 lastUsedNode = null; 252 256 wayIsFinished = true; 257 253 258 Main.map.selectSelectTool(true); 254 259 return; 255 260 } 261 oldMousePos = mousePos; 262 256 263 // we copy ctrl/alt/shift from the event just in case our global 257 264 // AWTEvent didn't make it through the security manager. Unclear 258 265 // if that can ever happen but better be safe.
