X-Git-Url: http://gitweb.fperrin.net/?p=GpsPrune.git;a=blobdiff_plain;f=tim%2Fprune%2Fundo%2FUndoRearrangeWaypoints.java;h=5073bfe0243c55097e2c5027cefe2a94185b0335;hp=d48dc2a174b72b859f318239b9fb78ff2db3b135;hb=1ee49ae3c8ef3aa2e63eadd458531e5f8bd4f92c;hpb=112bb0c9b46894adca9a33ed8c99ea712b253185 diff --git a/tim/prune/undo/UndoRearrangeWaypoints.java b/tim/prune/undo/UndoRearrangeWaypoints.java index d48dc2a..5073bfe 100644 --- a/tim/prune/undo/UndoRearrangeWaypoints.java +++ b/tim/prune/undo/UndoRearrangeWaypoints.java @@ -1,44 +1,19 @@ package tim.prune.undo; -import tim.prune.I18nManager; -import tim.prune.data.DataPoint; import tim.prune.data.Track; -import tim.prune.data.TrackInfo; /** * Operation to undo a waypoint rearrangement */ -public class UndoRearrangeWaypoints implements UndoOperation +public class UndoRearrangeWaypoints extends UndoReorder { - private DataPoint[] _contents = null; - - /** * Constructor * @param inTrack track contents to copy */ public UndoRearrangeWaypoints(Track inTrack) { - _contents = inTrack.cloneContents(); + super(inTrack, "undo.rearrangewaypoints"); } - - /** - * @return description of operation - */ - public String getDescription() - { - return I18nManager.getText("undo.rearrangewaypoints"); - } - - - /** - * Perform the undo operation on the given Track - * @param inTrackInfo TrackInfo object on which to perform the operation - */ - public void performUndo(TrackInfo inTrackInfo) throws UndoException - { - // restore track to previous values - inTrackInfo.getTrack().replaceContents(_contents); - } } \ No newline at end of file