Changeset 8318 in josm for trunk/src/org/openstreetmap/josm/gui/layer/geoimage
- Timestamp:
- 2015-05-03T18:34:33+02:00 (9 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/gui/layer/geoimage
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/layer/geoimage/CorrelateGpxWithImages.java
r8308 r8318 999 999 1000 1000 // no images found, exit 1001 if(imgs. size() <= 0) {1001 if(imgs.isEmpty()) { 1002 1002 JOptionPane.showMessageDialog(Main.parent, 1003 1003 tr("The selected photos do not contain time information."), … … 1207 1207 // before the first point will be geotagged with the starting point 1208 1208 if (prevWpTime == 0 || curWpTime <= prevWpTime) { 1209 while (true) { 1210 if (i < 0) { 1211 break; 1212 } 1209 while (i >= 0) { 1213 1210 final ImageEntry curImg = images.get(i); 1214 1211 long time = curImg.getExifTime().getTime(); … … 1231 1228 // This code gives a simple linear interpolation of the coordinates between current and 1232 1229 // previous track point assuming a constant speed in between 1233 while (true) { 1234 if (i < 0) { 1235 break; 1236 } 1230 while (i >= 0) { 1237 1231 ImageEntry curImg = images.get(i); 1238 1232 long imgTime = curImg.getExifTime().getTime(); -
trunk/src/org/openstreetmap/josm/gui/layer/geoimage/GeoImageLayer.java
r8285 r8318 713 713 714 714 public void showNextPhoto() { 715 if (data != null && data.size() > 0) {715 if (data != null && !data.isEmpty()) { 716 716 currentPhoto++; 717 717 if (currentPhoto >= data.size()) { … … 739 739 740 740 public void showFirstPhoto() { 741 if (data != null && data.size() > 0) {741 if (data != null && !data.isEmpty()) { 742 742 currentPhoto = 0; 743 743 ImageViewerDialog.showImage(this, data.get(currentPhoto)); … … 749 749 750 750 public void showLastPhoto() { 751 if (data != null && data.size() > 0) {751 if (data != null && !data.isEmpty()) { 752 752 currentPhoto = data.size() - 1; 753 753 ImageViewerDialog.showImage(this, data.get(currentPhoto)); … … 764 764 765 765 public void removeCurrentPhoto() { 766 if (data != null && data.size() > 0&& currentPhoto >= 0 && currentPhoto < data.size()) {766 if (data != null && !data.isEmpty() && currentPhoto >= 0 && currentPhoto < data.size()) { 767 767 data.remove(currentPhoto); 768 768 if (currentPhoto >= data.size()) { … … 781 781 public void removeCurrentPhotoFromDisk() { 782 782 ImageEntry toDelete = null; 783 if (data != null && data.size() > 0&& currentPhoto >= 0 && currentPhoto < data.size()) {783 if (data != null && !data.isEmpty() && currentPhoto >= 0 && currentPhoto < data.size()) { 784 784 toDelete = data.get(currentPhoto); 785 785 … … 828 828 public void copyCurrentPhotoPath() { 829 829 ImageEntry toCopy = null; 830 if (data != null && data.size() > 0&& currentPhoto >= 0 && currentPhoto < data.size()) {830 if (data != null && !data.isEmpty() && currentPhoto >= 0 && currentPhoto < data.size()) { 831 831 toCopy = data.get(currentPhoto); 832 832 String copyString = toCopy.getFile().toString();
Note:
See TracChangeset
for help on using the changeset viewer.