X-Git-Url: http://gitweb.fperrin.net/?a=blobdiff_plain;f=tim%2Fprune%2Fundo%2FUndoConnectPhoto.java;fp=tim%2Fprune%2Fundo%2FUndoConnectPhoto.java;h=0000000000000000000000000000000000000000;hb=f35b6d628f68e3b5ef19965ad8988d0dd1eb8efa;hp=3e653ce54216708e906eab8a3373ded5284ffb5f;hpb=3745d70b1427bb8ac1a085e47cbdc566936784e1;p=GpsPrune.git diff --git a/tim/prune/undo/UndoConnectPhoto.java b/tim/prune/undo/UndoConnectPhoto.java deleted file mode 100644 index 3e653ce..0000000 --- a/tim/prune/undo/UndoConnectPhoto.java +++ /dev/null @@ -1,61 +0,0 @@ -package tim.prune.undo; - -import tim.prune.I18nManager; -import tim.prune.UpdateMessageBroker; -import tim.prune.data.DataPoint; -import tim.prune.data.Photo; -import tim.prune.data.TrackInfo; - -/** - * Operation to undo the connection of a photo to a point - */ -public class UndoConnectPhoto implements UndoOperation -{ - private DataPoint _point = null; - private String _filename = null; - - - /** - * Constructor - * @param inPoint data point - * @param inFilename filename of photo - */ - public UndoConnectPhoto(DataPoint inPoint, String inFilename) - { - _point = inPoint; - _filename = inFilename; - } - - - /** - * @return description of operation including photo filename - */ - public String getDescription() - { - String desc = I18nManager.getText("undo.connectphoto") + " " + _filename; - return desc; - } - - - /** - * 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 - { - // Disconnect again - Photo photo = _point.getPhoto(); - if (photo != null) - { - _point.setPhoto(null); - photo.setDataPoint(null); - // inform subscribers - UpdateMessageBroker.informSubscribers(); - } - else - { - // throw exception if failed - throw new UndoException(getDescription()); - } - } -} \ No newline at end of file