]> gitweb.fperrin.net Git - GpsPrune.git/blobdiff - tim/prune/undo/UndoRearrangeWaypoints.java
Version 9, February 2010
[GpsPrune.git] / tim / prune / undo / UndoRearrangeWaypoints.java
index d48dc2a174b72b859f318239b9fb78ff2db3b135..5073bfe0243c55097e2c5027cefe2a94185b0335 100644 (file)
@@ -1,44 +1,19 @@
 package tim.prune.undo;\r
 \r
-import tim.prune.I18nManager;\r
-import tim.prune.data.DataPoint;\r
 import tim.prune.data.Track;\r
-import tim.prune.data.TrackInfo;\r
 \r
 /**\r
  * Operation to undo a waypoint rearrangement\r
  */\r
-public class UndoRearrangeWaypoints implements UndoOperation\r
+public class UndoRearrangeWaypoints extends UndoReorder\r
 {\r
-       private DataPoint[] _contents = null;\r
-\r
-\r
        /**\r
         * Constructor\r
         * @param inTrack track contents to copy\r
         */\r
        public UndoRearrangeWaypoints(Track inTrack)\r
        {\r
-               _contents = inTrack.cloneContents();\r
+               super(inTrack, "undo.rearrangewaypoints");\r
        }\r
 \r
-\r
-       /**\r
-        * @return description of operation\r
-        */\r
-       public String getDescription()\r
-       {\r
-               return I18nManager.getText("undo.rearrangewaypoints");\r
-       }\r
-\r
-\r
-       /**\r
-        * Perform the undo operation on the given Track\r
-        * @param inTrackInfo TrackInfo object on which to perform the operation\r
-        */\r
-       public void performUndo(TrackInfo inTrackInfo) throws UndoException\r
-       {\r
-               // restore track to previous values\r
-               inTrackInfo.getTrack().replaceContents(_contents);\r
-       }\r
 }
\ No newline at end of file