- Timestamp:
- 2011-11-29T00:55:26+01:00 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/mapmode/SelectAction.java
r4562 r4617 125 125 private long mouseDownTime = 0; 126 126 /** 127 * The pressed button of the user mouse down event. 128 */ 129 private int mouseDownButton = 0; 130 /** 131 * The time of the user mouse down event. 132 */ 133 private long mouseReleaseTime = 0; 134 /** 127 135 * The time which needs to pass between click and release before something 128 136 * counts as a move, in milliseconds … … 336 344 if (!mv.isActiveLayerVisible()) 337 345 return; 346 347 // Swing sends random mouseDragged events when closing dialogs by double-clicking their top-left icon on Windows 348 // Ignore such false events to prevent issues like #7078 349 if (mouseDownButton == MouseEvent.BUTTON1 && mouseReleaseTime > mouseDownTime) { 350 return; 351 } 338 352 339 353 cancelDrawMode = true; … … 648 662 public void mousePressed(MouseEvent e) { 649 663 // return early 650 if (!mv.isActiveLayerVisible() || !(Boolean) this.getValue("active") || e.getButton() != MouseEvent.BUTTON1)664 if (!mv.isActiveLayerVisible() || !(Boolean) this.getValue("active") || (mouseDownButton = e.getButton()) != MouseEvent.BUTTON1) 651 665 return; 652 666 … … 705 719 706 720 startingDraggingPos = null; 721 mouseReleaseTime = System.currentTimeMillis(); 707 722 708 723 if (mode == Mode.select) {
Note:
See TracChangeset
for help on using the changeset viewer.