Ignore:
Timestamp:
2009-01-01T06:56:26+01:00 (16 years ago)
Author:
khris78
Message:

Fixed #1554, #1664

File:
1 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/agpifoj/src/org/openstreetmap/josm/plugins/agpifoj/AgpifojDialog.java

    r12588 r12746  
    3535    private boolean centerView = false;
    3636   
    37     // Only one instance of thar class
     37    // Only one instance of that class
    3838    static private AgpifojDialog INSTANCE = null;
    3939   
     
    160160        }
    161161       
    162         imgDisplay.setImage(entry != null ? entry.file : null);
    163         StringBuffer osd = new StringBuffer(entry.file.getName());
    164         if (entry.elevation != null) {
    165             osd.append(tr("\nAltitude: ")).append(entry.elevation.longValue()).append(" m");
     162        if (entry != null) {
     163            imgDisplay.setImage(entry.file);
     164            StringBuffer osd = new StringBuffer(entry.file != null ? entry.file.getName() : "");
     165            if (entry.elevation != null) {
     166                osd.append(tr("\nAltitude: {0} m", entry.elevation.longValue()));
     167            }
     168            if (entry.speed != null) {
     169                osd.append(tr("\n{0} km/h", (long) (3.6 * entry.speed)));
     170            }
     171            imgDisplay.setOsdText(osd.toString());
     172        } else {
     173            imgDisplay.setImage(null);
     174            imgDisplay.setOsdText("");
    166175        }
    167         if (entry.speed != null) {
    168             osd.append("\n").append((long) (3.6 * entry.speed)).append(tr(" km/h"));
    169         }
    170         imgDisplay.setOsdText(osd.toString());
    171176    }
    172 
    173177}
Note: See TracChangeset for help on using the changeset viewer.