1 package tim.prune.undo;
3 import tim.prune.data.DataPoint;
4 import tim.prune.data.TrackInfo;
7 * Operation to undo the connection of a photo to a point
8 * where the point had to be cloned
10 public class UndoConnectPhotoWithClone extends UndoConnectPhoto
12 /** Additional undo object for removing inserted point */
13 private UndoInsert _undoInsert = null;
18 * @param inPoint data point
19 * @param inFilename filename of photo
20 * @param inIndex index of cloned point
22 public UndoConnectPhotoWithClone(DataPoint inPoint, String inFilename, int inIndex)
24 super(inPoint, inFilename);
25 // Make an undo object for the insert
26 _undoInsert = new UndoInsert(inIndex, 1);
30 * Perform the undo operation on the given Track
31 * @param inTrackInfo TrackInfo object on which to perform the operation
33 public void performUndo(TrackInfo inTrackInfo) throws UndoException
35 //System.out.println("Performing undo: (" + super.getDescription() + ", " + _undoInsert.getDescription() + ")");
36 // Firstly, undo connect
37 super.performUndo(inTrackInfo);
38 // Next, undo insert to remove cloned point
39 _undoInsert.performUndo(inTrackInfo);