Changeset 808 in josm
- Timestamp:
- 2008-08-18T23:09:36+02:00 (16 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/data
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/Preferences.java
r807 r808 334 334 335 335 synchronized public int getInteger(String key, int def) { 336 putDefault(key, Integer.toString(def)); 336 337 String v = get(key); 337 338 if(null == v) -
trunk/src/org/openstreetmap/josm/data/osm/visitor/MapPaintVisitor.java
r805 r808 156 156 { 157 157 // hack to make direction arrows visible against filled background 158 if (showDirection )159 drawSeg(lastN, n, w.selected ? selectedColor : untaggedColor, showDirection, width, true);158 if (showDirection || virtualNodeSize != 0) 159 drawSeg(lastN, n, w.selected ? selectedColor : untaggedColor, showDirection, width, false, false); 160 160 } 161 161 else 162 drawSeg(lastN, n, w.selected ? selectedColor : colour, showDirection, width, true );162 drawSeg(lastN, n, w.selected ? selectedColor : colour, showDirection, width, true, true); 163 163 } else { 164 164 if (realWidth > 0 && useRealWidth && !showDirection) { … … 166 166 if (tmpWidth > width) width = tmpWidth; 167 167 } 168 drawSeg(lastN, n, w.selected ? selectedColor : colour, showDirection, width, dashed );168 drawSeg(lastN, n, w.selected ? selectedColor : colour, showDirection, width, dashed, true); 169 169 } 170 170 … … 227 227 protected void drawSegment(Node n1, Node n2, Color col, boolean showDirection) { 228 228 if (useRealWidth && showDirection) showDirection = false; 229 drawSeg(n1, n2, col, showDirection, 1, false );230 } 231 232 private void drawSeg(Node n1, Node n2, Color col, boolean showDirection, int width, boolean dashed ) {229 drawSeg(n1, n2, col, showDirection, 1, false, true); 230 } 231 232 private void drawSeg(Node n1, Node n2, Color col, boolean showDirection, int width, boolean dashed, boolean drawway) { 233 233 if (col != currentColor || width != currentWidth || dashed != currentDashed) { 234 234 displaySegments(col, width, dashed); … … 241 241 } 242 242 drawVirtualNode(p1, p2, col); 243 currentPath.moveTo(p1.x, p1.y); 244 currentPath.lineTo(p2.x, p2.y); 243 if(drawway) 244 { 245 currentPath.moveTo(p1.x, p1.y); 246 currentPath.lineTo(p2.x, p2.y); 247 } 245 248 246 249 if (showDirection) { 247 250 double t = Math.atan2(p2.y-p1.y, p2.x-p1.x) + Math.PI; 251 if(!drawway) 252 currentPath.moveTo(p2.x, p2.y); 248 253 currentPath.lineTo((int)(p2.x + 10*Math.cos(t-PHI)), (int)(p2.y + 10*Math.sin(t-PHI))); 249 254 currentPath.moveTo((int)(p2.x + 10*Math.cos(t+PHI)), (int)(p2.y + 10*Math.sin(t+PHI))); … … 321 326 osm.visit(this); 322 327 328 for (final OsmPrimitive osm : data.getSelected()) 329 if (!osm.incomplete && !osm.deleted){ 330 osm.visit(this); 331 } 332 323 333 for (final OsmPrimitive osm : data.nodes) 324 334 if (!osm.incomplete && !osm.deleted) 325 335 osm.visit(this); 326 327 for (final OsmPrimitive osm : data.getSelected())328 if (!osm.incomplete && !osm.deleted){329 osm.visit(this);330 }331 336 displaySegments(); 332 337 }
Note:
See TracChangeset
for help on using the changeset viewer.