X-Git-Url: https://gitweb.fperrin.net/?a=blobdiff_plain;f=tim%2Fprune%2Fdata%2FTrackInfo.java;h=6fa8e90b2e54ba39186053fcc38a1433d5ec298c;hb=c0387c124840c9407e040600fda88f3c3e8f6aa6;hp=eddea09468c58f7f0cfda69772ce88c690462d7e;hpb=112bb0c9b46894adca9a33ed8c99ea712b253185;p=GpsPrune.git diff --git a/tim/prune/data/TrackInfo.java b/tim/prune/data/TrackInfo.java index eddea09..6fa8e90 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,21 @@ 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 || _selection.getCurrentPointIndex() != _selection.getEnd()) { + rangeStart = _selection.getCurrentPointIndex(); + } + selectPoint(inPointNum); + if (rangeStart < inPointNum) { + _selection.selectRange(rangeStart, inPointNum); + } + } }