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