lastMousePos = e.getPoint();
startEN = mv.getEastNorth(lastMousePos.x,lastMousePos.y);
// primitives under cursor are stored in c collection
OsmPrimitive nearestPrimitive = mv.getNearestNodeOrWay(e.getPoint(), OsmPrimitive.isSelectablePredicate, true);
determineMapMode(nearestPrimitive!=null);
switch(mode) {
case rotate:
case scale:
// if nothing was selected, select primitive under cursor for scaling or rotating
if (getCurrentDataSet().getSelected().isEmpty()) {
getCurrentDataSet().setSelected(asColl(nearestPrimitive));
}
// Mode.select redraws when selectPrims is called
// Mode.move redraws when mouseDragged is called
// Mode.rotate redraws here
// Mode.scale redraws here
break;
case move:
// also include case when some primitive is under cursor and no shift+ctrl / alt+ctrl is pressed
// so this is not movement, but selection on primitive under cursor
if (!cancelDrawMode && nearestPrimitive instanceof Way) {
virtualManager.activateVirtualNodeNearPoint(e.getPoint());
}
OsmPrimitive toSelect = cycleManager.cycleSetup(nearestPrimitive, e.getPoint());
selectPrims(asColl(toSelect), false, false);
useLastMoveCommandIfPossible();
// Schedule a timer to update status line "initialMoveDelay+1" ms in the future
GuiHelper.scheduleTimer(initialMoveDelay+1, new ActionListener() {
@Override