X-Git-Url: http://gitweb.fperrin.net/?a=blobdiff_plain;f=tim%2Fprune%2Fundo%2FUndoDeletePhoto.java;h=45be6addcb5040fa2844caad22f0c236ddd6fa91;hb=326f489e36aa7f235bc19409a57bf4955cd50f24;hp=b2831f0301ab32c217ec81848074e2f1213facf7;hpb=ca9bdb3916f9c39adbbf95d06ac95c21dafbb4e6;p=GpsPrune.git diff --git a/tim/prune/undo/UndoDeletePhoto.java b/tim/prune/undo/UndoDeletePhoto.java index b2831f0..45be6ad 100644 --- a/tim/prune/undo/UndoDeletePhoto.java +++ b/tim/prune/undo/UndoDeletePhoto.java @@ -9,7 +9,7 @@ import tim.prune.data.TrackInfo; /** * Operation to undo a delete of a single photo, either with or without point */ -public class UndoDeletePhoto implements UndoOperation +public class UndoDeletePhoto extends UndoDeleteOperation { private int _photoIndex = -1; private Photo _photo = null; @@ -38,7 +38,7 @@ public class UndoDeletePhoto implements UndoOperation */ public String getDescription() { - String desc = I18nManager.getText("undo.deletephoto") + " " + _photo.getFile().getName(); + String desc = I18nManager.getText("undo.removephoto") + " " + _photo.getName(); return desc; } @@ -58,6 +58,8 @@ public class UndoDeletePhoto implements UndoOperation { throw new UndoException(getDescription()); } + // Change the current point/range selection if required + modifySelection(inTrackInfo, _pointIndex, _pointIndex); } else { @@ -66,8 +68,7 @@ public class UndoDeletePhoto implements UndoOperation } // Ensure that photo is associated with point and vice versa _photo.setDataPoint(_point); - if (_point != null) - { + if (_point != null) { _point.setPhoto(_photo); } }