Ignore:
Timestamp:
2009-10-11T16:37:08+02:00 (15 years ago)
Author:
jttt
Message:

Replace testing for id <= 0 with isNew() method

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/MapStatus.java

    r2264 r2273  
    320320            // pressed. Cannot use "setSelected()" because it will cause a
    321321            // fireSelectionChanged event which is unnecessary at this point.
    322             if((mods & MouseEvent.SHIFT_DOWN_MASK) == 0)
     322            if((mods & MouseEvent.SHIFT_DOWN_MASK) == 0) {
    323323                ds.clearSelection();
     324            }
    324325
    325326            // This will cycle through the available items.
     
    415416            final StringBuilder text = new StringBuilder();
    416417            String name = osm.getDisplayName(DefaultNameFormatter.getInstance());
    417             if (osm.getId() == 0 || osm.isModified()) {
     418            if (osm.isNew() || osm.isModified()) {
    418419                name = "<i><b>"+ name + "*</b></i>";
    419420            }
    420421            text.append(name);
    421422
    422             if (osm.getId() != 0) {
     423            if (!osm.isNew()) {
    423424                text.append(" [id="+osm.getId()+"]");
    424425            }
Note: See TracChangeset for help on using the changeset viewer.