| 610 | | if (mode == Mode.MOVE && e.getButton() == MouseEvent.BUTTON1) { |
| 611 | | DataSet ds = getLayerManager().getEditDataSet(); |
| 612 | | if (!didMouseDrag) { |
| 613 | | // only built in move mode |
| 614 | | virtualManager.clear(); |
| 615 | | // do nothing if the click was to short too be recognized as a drag, |
| 616 | | // but the release position is farther than 10px away from the press position |
| 617 | | if (lastMousePos == null || lastMousePos.distanceSq(e.getPoint()) < 100) { |
| 618 | | updateKeyModifiers(e); |
| 619 | | selectPrims(cycleManager.cyclePrims(), true, false); |
| | 610 | if (mode == Mode.MOVE && e.getButton() == MouseEvent.BUTTON1 && !didMouseDrag) { |
| | 611 | // only built in move mode |
| | 612 | virtualManager.clear(); |
| | 613 | // do nothing if the click was to short too be recognized as a drag, |
| | 614 | // but the release position is farther than 10px away from the press position |
| | 615 | if (lastMousePos == null || lastMousePos.distanceSq(e.getPoint()) < 100) { |
| | 616 | DataSet ds = getLayerManager().getEditDataSet(); |
| | 617 | updateKeyModifiers(e); |
| | 618 | selectPrims(cycleManager.cyclePrims(), true, false); |
| 621 | | // If the user double-clicked a node, change to draw mode |
| 622 | | Collection<OsmPrimitive> c = ds.getSelected(); |
| 623 | | if (e.getClickCount() >= 2 && c.size() == 1 && c.iterator().next() instanceof Node) { |
| 624 | | // We need to do it like this as otherwise drawAction will see a double |
| 625 | | // click and switch back to SelectMode |
| 626 | | MainApplication.worker.execute(() -> map.selectDrawTool(true)); |
| 627 | | return; |
| 628 | | } |
| | 620 | // If the user double-clicked a node, change to draw mode |
| | 621 | Collection<OsmPrimitive> c = ds.getSelected(); |
| | 622 | if (e.getClickCount() >= 2 && c.size() == 1 && c.iterator().next() instanceof Node) { |
| | 623 | // We need to do it like this as otherwise drawAction will see a double |
| | 624 | // click and switch back to SelectMode |
| | 625 | MainApplication.worker.execute(() -> map.selectDrawTool(true)); |
| | 626 | return; |