IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
diff --git a/plugins/buildings_tools/src/org/openstreetmap/josm/plugins/buildings_tools/DrawBuildingAction.java b/plugins/buildings_tools/src/org/openstreetmap/josm/plugins/buildings_tools/DrawBuildingAction.java
|
a
|
b
|
|
| 50 | 50 | None, Drawing, DrawingWidth, DrawingAngFix |
| 51 | 51 | } |
| 52 | 52 | |
| 53 | | private final Cursor cursorCrosshair; |
| 54 | 53 | private final Cursor cursorJoinNode; |
| 55 | 54 | private final Cursor cursorJoinWay; |
| 56 | 55 | private Cursor currCursor; |
| … |
… |
|
| 70 | 69 | Shortcut.registerShortcut("mapmode:buildings", |
| 71 | 70 | tr("Mode: {0}", tr("Draw buildings")), |
| 72 | 71 | KeyEvent.VK_B, Shortcut.DIRECT), |
| 73 | | getCursor()); |
| | 72 | // Set super.cursor to crosshair without overlay because super.cursor is final, |
| | 73 | // but we use two different cursors with overlays for rectangular and circular buildings |
| | 74 | // the actual cursor is drawn in enterMode() |
| | 75 | ImageProvider.getCursor("crosshair", null)); |
| 74 | 76 | |
| 75 | | cursorCrosshair = getCursor(); |
| | 77 | currCursor = getCursor(); |
| 76 | 78 | cursorJoinNode = ImageProvider.getCursor("crosshair", "joinnode"); |
| 77 | 79 | cursorJoinWay = ImageProvider.getCursor("crosshair", "joinway"); |
| 78 | | currCursor = cursorCrosshair; |
| 79 | 80 | } |
| 80 | 81 | |
| 81 | 82 | private static Cursor getCursor() { |
| … |
… |
|
| 133 | 134 | @Override |
| 134 | 135 | public void enterMode() { |
| 135 | 136 | super.enterMode(); |
| | 137 | // super.enterMode() draws the basic cursor. Overwrite it immediately with the cursor for the current building mode. |
| | 138 | updCursor(); |
| 136 | 139 | MapFrame map = MainApplication.getMap(); |
| 137 | 140 | if (getLayerManager().getEditDataSet() == null) { |
| 138 | 141 | map.selectSelectTool(false); |
| 139 | 142 | return; |
| 140 | 143 | } |
| 141 | 144 | selectedColor = new NamedColorProperty(marktr("selected"), selectedColor).get(); |
| 142 | | currCursor = cursorCrosshair; |
| 143 | 145 | map.mapView.addMouseListener(this); |
| 144 | 146 | map.mapView.addMouseMotionListener(this); |
| 145 | 147 | map.mapView.addTemporaryLayer(this); |
| … |
… |
|
| 385 | 387 | } |
| 386 | 388 | |
| 387 | 389 | private void updCursor() { |
| 388 | | if (mousePos == null) |
| 389 | | return; |
| 390 | 390 | if (!MainApplication.isDisplayingMapView()) |
| 391 | 391 | return; |
| 392 | | Node n = null; |
| 393 | | if (!ctrl) { |
| 394 | | n = MainApplication.getMap().mapView.getNearestNode(mousePos, OsmPrimitive::isSelectable); |
| | 392 | |
| | 393 | if (!ctrl && (mousePos != null)) { |
| | 394 | Node n = MainApplication.getMap().mapView.getNearestNode(mousePos, OsmPrimitive::isSelectable); |
| 395 | 395 | if (n != null) { |
| 396 | 396 | setCursor(cursorJoinNode); |
| 397 | 397 | return; |