]> gitweb.fperrin.net Git - GpsPrune.git/blobdiff - tim/prune/data/TrackInfo.java
Version 9, February 2010
[GpsPrune.git] / tim / prune / data / TrackInfo.java
index eddea09468c58f7f0cfda69772ce88c690462d7e..254de9341e6119d098ef327196cefdfa0b20a7fa 100644 (file)
@@ -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);
+               }
+       }
 }