Ignore:
Timestamp:
2007-04-03T15:31:33+02:00 (19 years ago)
Author:
imi
Message:
  • added hidden config option "osm-primitives.showid" (true/false) to show the id of every object
  • fixed a bug that disabled moving map via Ctrl+cursor keys after opening the download dialog
  • fixed the incorrect display of older error messages in the please wait dialog
File:
1 edited

Legend:

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

    r120 r206  
    1111import javax.swing.JLabel;
    1212
     13import org.openstreetmap.josm.Main;
    1314import org.openstreetmap.josm.data.osm.Node;
     15import org.openstreetmap.josm.data.osm.OsmPrimitive;
    1416import org.openstreetmap.josm.data.osm.Segment;
    1517import org.openstreetmap.josm.data.osm.Way;
     
    5052                                name = (ls.id==0?"":ls.id+" ")+"("+ls.from.coor.lat()+","+ls.from.coor.lon()+") -> ("+ls.to.coor.lat()+","+ls.to.coor.lon()+")";
    5153                }
     54                addId(ls);
    5255                icon = ImageProvider.get("data", "segment");
    5356                trn("segment", "segments", 0); // no marktrn available
     
    6366                if (name == null)
    6467                        name = (n.id==0?"":""+n.id)+" ("+n.coor.lat()+","+n.coor.lon()+")";
     68                addId(n);
    6569                icon = ImageProvider.get("data", "node");
    6670                trn("node", "nodes", 0); // no marktrn available
     
    8993                                name += " ("+tr("incomplete")+")";
    9094                }
     95                addId(w);
    9196                icon = ImageProvider.get("data", "way");
    9297                trn("way", "ways", 0); // no marktrn available
     
    97102                return new JLabel(name, icon, JLabel.HORIZONTAL);
    98103        }
     104
     105
     106        private void addId(OsmPrimitive osm) {
     107            if (Main.pref.getBoolean("osm-primitives.showid"))
     108                        name += " (id: "+osm.id+")";
     109    }
    99110}
Note: See TracChangeset for help on using the changeset viewer.