Changeset 1458 in josm for trunk/src/org/openstreetmap
- Timestamp:
- 2009-03-01T00:09:25+01:00 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/mapmode/DrawAction.java
r1457 r1458 139 139 } 140 140 141 /** 142 * Checks if a map redraw is required and does so if needed. Also updates the status bar 143 */ 141 144 private void redrawIfRequired() { 145 updateStatusLine(); 142 146 if ((!drawHelperLine || wayIsFinished) && !drawTargetHighlight) return; 143 147 Main.map.mapView.repaint(); … … 156 160 } 157 161 158 // This happens when nothing is selected 159 if(mouseOnExistingNode == null && Main.ds.getSelected().size() == 0 && mousePos != null) 162 // This happens when nothing is selected, but we still want to highlight the "target node" 163 if(mouseOnExistingNode == null && Main.ds.getSelected().size() == 0 164 && mousePos != null && !shift) 160 165 mouseOnExistingNode = Main.map.mapView.getNearestNode(mousePos); 161 166 … … 654 659 655 660 if (selectedNode == null) { 656 if (selectedWay == null) return; 661 if (selectedWay == null) 662 return; 657 663 if (selectedWay.isFirstLastNode(lastUsedNode)) { 658 664 currentBaseNode = lastUsedNode; … … 669 675 } 670 676 671 if (currentBaseNode == null || currentBaseNode == currentMouseNode) { 672 updateStatusLine(); 677 if (currentBaseNode == null || currentBaseNode == currentMouseNode) 673 678 return; // Don't create zero length way segments. 674 }675 679 676 680 // find out the distance, in metres, between the base point and the mouse cursor … … 685 689 Main.map.statusLine.setHeading(hdg); 686 690 Main.map.statusLine.setDist(distance); 687 updateStatusLine(); 691 // Now done in redrawIfRequired() 692 //updateStatusLine(); 688 693 } 689 694 … … 875 880 } else { 876 881 // oldHighlights may store a node or way, check if it's a node 877 for(OsmPrimitive x : oldHighlights) { 878 if(x instanceof Node) 879 rv = tr("Select node under cursor."); 880 else 881 rv = tr("Insert new node into {0} way(s).", oldHighlights.size()); 882 break; 883 } 882 OsmPrimitive x = oldHighlights.iterator().next(); 883 if(x instanceof Node) 884 rv = tr("Select node under cursor."); 885 else 886 rv = tr("Insert new node into {0} way(s).", oldHighlights.size()); 884 887 } 885 888
Note:
See TracChangeset
for help on using the changeset viewer.