X-Git-Url: https://gitweb.fperrin.net/?p=GpsPrune.git;a=blobdiff_plain;f=tim%2Fprune%2Fsave%2FKmlExporter.java;h=802183427fd0212300ac91314cc4c8afb1e60f20;hp=6fbf7498bf4651e3445e00ae7f566703bc615cd1;hb=8c8868ae29b3252f02e094c02307384cf61ba667;hpb=7f5ed2be62905bd37717376dc22d09e5ea7edb4d diff --git a/tim/prune/save/KmlExporter.java b/tim/prune/save/KmlExporter.java index 6fbf749..8021834 100644 --- a/tim/prune/save/KmlExporter.java +++ b/tim/prune/save/KmlExporter.java @@ -525,7 +525,7 @@ public class KmlExporter extends GenericFunction implements Runnable } // Make a blob with description for each photo // Photos have already been written so picture sizes already known - if (point.getPhoto() != null && writePhotos && writeCurrentPoint) + if (point.getPhoto() != null && point.getPhoto().isValid() && writePhotos && writeCurrentPoint) { if (!writtenPhotoHeader) { @@ -876,21 +876,21 @@ public class KmlExporter extends GenericFunction implements Runnable ImageWriter imageWriter = writers.next(); // Check selection checkbox - boolean justSelection = _pointTypeSelector.getJustSelection(); + final boolean justSelection = _pointTypeSelector.getJustSelection(); int selStart = -1, selEnd = -1; if (justSelection) { selStart = _trackInfo.getSelection().getStart(); selEnd = _trackInfo.getSelection().getEnd(); } - int numPoints = _track.getNumPoints(); + final int numPoints = _track.getNumPoints(); DataPoint point = null; int photoNum = 0; // Loop over all points in track for (int i=0; i=selStart && i<=selEnd))) + if (point.getPhoto() != null && point.getPhoto().isValid() && (!justSelection || (i>=selStart && i<=selEnd))) { photoNum++; // Make a new entry in zip file