Changeset 2708 in osm for applications/editors/josm/plugins/mappaint/src/mappaint/MapPaintVisitor.java
- Timestamp:
- 2007-05-01T23:02:45+02:00 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/mappaint/src/mappaint/MapPaintVisitor.java
r2688 r2708 35 35 // Altered from SimplePaintVisitor 36 36 @Override public void visit(Node n) { 37 if (!n.shown) { 38 ElemStyle nodeStyle = MapPaintPlugin.elemStyles.getStyle(n); 39 if(nodeStyle!=null && Main.map.mapView.zoom()>=nodeStyle.getMinZoom()){ 40 if(nodeStyle instanceof IconElemStyle) { 41 drawNode(n, ((IconElemStyle)nodeStyle).getIcon()); 42 } else { 43 // throw some sort of exception 44 } 37 ElemStyle nodeStyle = MapPaintPlugin.elemStyles.getStyle(n); 38 if(nodeStyle!=null && Main.map.mapView.zoom()>=nodeStyle.getMinZoom()){ 39 if(nodeStyle instanceof IconElemStyle) { 40 drawNode(n, ((IconElemStyle)nodeStyle).getIcon()); 45 41 } else { 46 drawNode(n, n.selected ? getPreferencesColor("selected", 47 Color.YELLOW) 48 : getPreferencesColor("node", Color.RED)); 49 } 42 // throw some sort of exception 43 } 44 } else { 45 drawNode(n, n.selected ? getPreferencesColor("selected", 46 Color.YELLOW) 47 : getPreferencesColor("node", Color.RED)); 50 48 } 51 49 } … … 135 133 // NEW 136 134 protected void drawNode(Node n, ImageIcon icon) { 137 if (n.shown) return;138 n.shown=true;139 135 Point p = nc.getPoint(n.eastNorth); 140 136 if ((p.x < 0) || (p.y < 0) || (p.x > nc.getWidth()) || (p.y > nc.getHeight())) return; … … 221 217 osm.shown=false; 222 218 223 for (final OsmPrimitive osm : data.nodes)224 if (!osm.deleted)225 osm.shown=false;226 227 219 for (final OsmPrimitive osm : data.ways) 228 220 if (!osm.deleted && MapPaintPlugin.elemStyles.isArea(osm))
Note:
See TracChangeset
for help on using the changeset viewer.