Changeset 1289 in josm for trunk/src/org/openstreetmap/josm/data
- Timestamp:
- 2009-01-17T23:45:34+01:00 (16 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/data/osm/visitor
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/osm/visitor/MapPaintVisitor.java
r1282 r1289 17 17 import java.util.LinkedList; 18 18 import java.util.Locale; 19 import java.util.Iterator; 19 20 20 21 import javax.swing.ImageIcon; … … 225 226 boolean showDirection = w.selected || ((!useRealWidth) && (showDirectionArrow 226 227 && (!showRelevantDirectionsOnly || w.hasDirectionKeys))); 228 // head only takes over control if the option is true, 229 // the direction should be shown at all and not only because it's selected 230 boolean showOnlyHeadArrowOnly = showDirection && !w.selected && showHeadArrowOnly; 227 231 int width = defaultSegmentWidth; 228 232 int realWidth = 0; //the real width of the element in meters … … 270 274 // draw the way 271 275 lastN = null; 272 for(Node n : w.nodes) 273 { 276 Iterator<Node> it = w.nodes.iterator(); 277 while (it.hasNext()) 278 { 279 Node n = it.next(); 274 280 if(lastN != null) 275 drawSeg(lastN, n, color, showDirection, width, dashed); 281 drawSeg(lastN, n, color, 282 showOnlyHeadArrowOnly ? !it.hasNext() : showDirection, width, dashed); 276 283 lastN = n; 277 284 } -
trunk/src/org/openstreetmap/josm/data/osm/visitor/SimplePaintVisitor.java
r1251 r1289 64 64 protected boolean showDirectionArrow; 65 65 protected boolean showRelevantDirectionsOnly; 66 protected boolean showHeadArrowOnly; 66 67 protected boolean showOrderNumber; 67 68 protected boolean fillSelectedNode; … … 101 102 showDirectionArrow = Main.pref.getBoolean("draw.segment.direction", true); 102 103 showRelevantDirectionsOnly = Main.pref.getBoolean("draw.segment.relevant_directions_only", true); 104 showHeadArrowOnly = Main.pref.getBoolean("draw.segment.head_only", false); 103 105 showOrderNumber = Main.pref.getBoolean("draw.segment.order_number", false); 104 106 selectedNodeRadius = Main.pref.getInteger("mappaint.node.selected-size", 5) / 2; … … 292 294 boolean showThisDirectionArrow = w.selected 293 295 || (showDirectionArrow && (!showRelevantDirectionsOnly || w.hasDirectionKeys)); 296 // head only takes over control if the option is true, 297 // the direction should be shown at all and not only because it's selected 298 boolean showOnlyHeadArrowOnly = showThisDirectionArrow && !w.selected && showHeadArrowOnly; 294 299 Color wayColor; 295 300 … … 307 312 for (int orderNumber = 1; it.hasNext(); orderNumber++) { 308 313 Point p = nc.getPoint(it.next().eastNorth); 309 drawSegment(lastP, p, w.selected && !inactive ? selectedColor : wayColor, showThisDirectionArrow); 314 drawSegment(lastP, p, w.selected && !inactive ? selectedColor : wayColor, 315 showOnlyHeadArrowOnly ? !it.hasNext() : showThisDirectionArrow); 310 316 if (showOrderNumber) 311 317 drawOrderNumber(lastP, p, orderNumber);
Note:
See TracChangeset
for help on using the changeset viewer.