X-Git-Url: https://gitweb.fperrin.net/?a=blobdiff_plain;f=tim%2Fprune%2Fsave%2FKmlExporter.java;h=50386ccebeea79a057e56fa18d925fcac546d00d;hb=a6197ddcaac11c0b943183da7d46169742d024af;hp=6fbf7498bf4651e3445e00ae7f566703bc615cd1;hpb=7f5ed2be62905bd37717376dc22d09e5ea7edb4d;p=GpsPrune.git diff --git a/tim/prune/save/KmlExporter.java b/tim/prune/save/KmlExporter.java index 6fbf749..50386cc 100644 --- a/tim/prune/save/KmlExporter.java +++ b/tim/prune/save/KmlExporter.java @@ -51,11 +51,11 @@ import tim.prune.data.Timestamp; import tim.prune.data.Track; import tim.prune.data.TrackInfo; import tim.prune.data.UnitSetLibrary; -import tim.prune.gui.ColourChooser; -import tim.prune.gui.ColourPatch; import tim.prune.gui.DialogCloser; import tim.prune.gui.ImageUtils; import tim.prune.gui.WholeNumberField; +import tim.prune.gui.colour.ColourChooser; +import tim.prune.gui.colour.ColourPatch; import tim.prune.load.GenericFileFilter; import tim.prune.save.xml.XmlUtils; @@ -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) { @@ -684,7 +684,7 @@ public class KmlExporter extends GenericFunction implements Runnable // Add timestamp (if any) to the list whenList.append(""); if (point.hasTimestamp()) { - whenList.append(point.getTimestamp().getText(Timestamp.FORMAT_ISO_8601)); + whenList.append(point.getTimestamp().getText(Timestamp.Format.ISO8601)); } whenList.append("\n"); // Add coordinates to the list @@ -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