Ignore:
Timestamp:
2005-12-28T01:29:01+01:00 (18 years ago)
Author:
imi
Message:
  • fixed bug in UTM
  • upload of nodes and segments
  • fixed bugs in display the selection
Location:
src/org/openstreetmap/josm/data/osm/visitor
Files:
1 added
1 deleted
3 edited

Legend:

Unmodified
Added
Removed
  • src/org/openstreetmap/josm/data/osm/visitor/AddVisitor.java

    r32 r35  
    2626        public void visit(Node n) {
    2727                ds.nodes.add(n);
    28                 ds.deleted.remove(n); // remove if there.
     28                n.setDeleted(false);
    2929        }
    3030        public void visit(LineSegment ls) {
    3131                ds.lineSegments.add(ls);
    32                 ds.deleted.remove(ls); // remove if there.
     32                ls.setDeleted(false);
    3333        }
    3434        public void visit(Track t) {
    3535                ds.tracks.add(t);
    36                 ds.deleted.remove(t); // remove if there.
     36                t.setDeleted(false);
    3737        }
    3838        public void visit(Key k) {}
  • src/org/openstreetmap/josm/data/osm/visitor/BoundingVisitor.java

    r23 r35  
    2121         * Calculate regarding lat/lon or x/y?
    2222         */
    23         public static enum Type {LATLON, XY};
     23        public static enum Type {LATLON, XY}
    2424        private Type type;
    25        
    26        
     25
     26
    2727        public BoundingVisitor(Type type) {
    2828                this.type = type;
  • src/org/openstreetmap/josm/data/osm/visitor/SimplePaintVisitor.java

    r30 r35  
    3030         */
    3131        private final MapView mv;
    32         /**
    33          * Can be set to non-<code>null</code> and then replace every other color.
    34          */
    35         private final Color forceColor;
    3632       
    3733        /**
     
    3935         * @param g   The graphics to draw to.
    4036         * @param mv  The view to get screen coordinates from.
    41          * @param forceColor If non-<code>null</code>, always draw with this color.
    4237         */
    43         public SimplePaintVisitor(Graphics g, MapView mv, Color forceColor) {
     38        public SimplePaintVisitor(Graphics g, MapView mv) {
    4439                this.g = g;
    4540                this.mv = mv;
    46                 this.forceColor = forceColor;
    4741        }
    4842       
     
    7064         */
    7165        public void visit(Track t) {
     66                // only to overwrite with blue
    7267                for (LineSegment ls : t.segments)
    73                         drawLineSegment(ls, darkblue);
     68                        if (!ls.isSelected()) // selected already in good color
     69                                drawLineSegment(ls, t.isSelected() ? Color.WHITE : darkblue);
    7470        }
    7571
     
    8884        private void drawNode(Node n, Color color) {
    8985                Point p = mv.getScreenPoint(n.coor);
    90                 g.setColor(forceColor != null ? forceColor : color);
     86                g.setColor(color);
    9187                g.drawRect(p.x-1, p.y-1, 2, 2);
    9288        }
     
    9692         */
    9793        private void drawLineSegment(LineSegment ls, Color col) {
    98                 if (forceColor != null)
    99                         col = forceColor;
    100                 else if (ls.isSelected())
     94                if (ls.isSelected())
    10195                        col = Color.WHITE;
    10296                g.setColor(col);
Note: See TracChangeset for help on using the changeset viewer.