]> gitweb.fperrin.net Git - GpsPrune.git/blobdiff - tim/prune/undo/UndoDeletePhoto.java
Version 16, February 2014
[GpsPrune.git] / tim / prune / undo / UndoDeletePhoto.java
index 4c37e616faf31f76c320ddaafe69e11edb00b982..45be6addcb5040fa2844caad22f0c236ddd6fa91 100644 (file)
@@ -9,7 +9,7 @@ import tim.prune.data.TrackInfo;
 /**\r
  * Operation to undo a delete of a single photo, either with or without point\r
  */\r
-public class UndoDeletePhoto implements UndoOperation\r
+public class UndoDeletePhoto extends UndoDeleteOperation\r
 {\r
        private int _photoIndex = -1;\r
        private Photo _photo = null;\r
@@ -38,7 +38,7 @@ public class UndoDeletePhoto implements UndoOperation
         */\r
        public String getDescription()\r
        {\r
-               String desc = I18nManager.getText("undo.removephoto") + " " + _photo.getFile().getName();\r
+               String desc = I18nManager.getText("undo.removephoto") + " " + _photo.getName();\r
                return desc;\r
        }\r
 \r
@@ -58,6 +58,8 @@ public class UndoDeletePhoto implements UndoOperation
                        {\r
                                throw new UndoException(getDescription());\r
                        }\r
+                       // Change the current point/range selection if required\r
+                       modifySelection(inTrackInfo, _pointIndex, _pointIndex);\r
                }\r
                else\r
                {\r