Ignore:
Timestamp:
2015-02-10T22:55:53+01:00 (9 years ago)
Author:
bastiK
Message:

applied #11059 - New method unflagNewGpsData(), modified infoText (patch by holgermappt)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/layer/geoimage/GeoImageLayer.java

    r7983 r8041  
    356356    }
    357357
     358    /**
     359     * Prepare the string that is displayed if layer information is requested.
     360     * @return String with layer information
     361     */
    358362    private String infoText() {
    359         int i = 0;
    360         for (ImageEntry e : data)
     363        int tagged = 0;
     364        int newdata = 0;
     365        for (ImageEntry e : data) {
    361366            if (e.getPos() != null) {
    362                 i++;
    363             }
    364         return trn("{0} image loaded.", "{0} images loaded.", data.size(), data.size())
    365                 + " " + trn("{0} was found to be GPS tagged.", "{0} were found to be GPS tagged.", i, i);
     367                tagged++;
     368            }
     369            if (e.hasNewGpsData()) {
     370                newdata++;
     371            }
     372        }
     373        return "<html>"
     374                + trn("{0} image loaded.", "{0} images loaded.", data.size(), data.size())
     375                + " " + trn("{0} was found to be GPS tagged.", "{0} were found to be GPS tagged.", tagged, tagged)
     376                + (newdata > 0 ? "<br>" + trn("{0} has updated GPS data.", "{0} have updated GPS data.", newdata, newdata) : "")
     377                + "</html>";
    366378    }
    367379
     
    10721084    }
    10731085
     1086    /**
     1087     * Get list of images in layer.
     1088     * @return List of images in layer
     1089     */
    10741090    public List<ImageEntry> getImages() {
    10751091        List<ImageEntry> copy = new ArrayList<>(data.size());
    10761092        for (ImageEntry ie : data) {
    1077             copy.add(ie.clone());
     1093            copy.add(ie);
    10781094        }
    10791095        return copy;
Note: See TracChangeset for help on using the changeset viewer.