X-Git-Url: https://gitweb.fperrin.net/?p=GpsPrune.git;a=blobdiff_plain;f=tim%2Fprune%2Fdata%2FTrackInfo.java;h=254de9341e6119d098ef327196cefdfa0b20a7fa;hp=eddea09468c58f7f0cfda69772ce88c690462d7e;hb=1ee49ae3c8ef3aa2e63eadd458531e5f8bd4f92c;hpb=112bb0c9b46894adca9a33ed8c99ea712b253185 diff --git a/tim/prune/data/TrackInfo.java b/tim/prune/data/TrackInfo.java index eddea09..254de93 100644 --- a/tim/prune/data/TrackInfo.java +++ b/tim/prune/data/TrackInfo.java @@ -55,6 +55,14 @@ public class TrackInfo return _fileInfo; } + /** + * Replace the file info with a previously made clone + * @param inInfo cloned file info + */ + public void setFileInfo(FileInfo inInfo) { + _fileInfo = inInfo; + } + /** * @return the PhotoList object */ @@ -382,4 +390,19 @@ public class TrackInfo } } } + + /** + * Extend the current selection to end at the given point, eg by shift-clicking + * @param inPointNum index of end point + */ + public void extendSelection(int inPointNum) + { + // See whether to start selection from current range start or current point + int rangeStart = _selection.getStart(); + if (rangeStart < 0) {rangeStart = _selection.getCurrentPointIndex();} + selectPoint(inPointNum); + if (rangeStart < inPointNum) { + _selection.selectRange(rangeStart, inPointNum); + } + } }