]> gitweb.fperrin.net Git - GpsPrune.git/blobdiff - tim/prune/undo/UndoEditPoint.java
Version 9, February 2010
[GpsPrune.git] / tim / prune / undo / UndoEditPoint.java
index a9f566531a37c3efd11ede111846dee844efedb1..228795b6d5d5d34e0b15d9bf7e955fc5f3544345 100644 (file)
@@ -3,7 +3,7 @@ package tim.prune.undo;
 import tim.prune.I18nManager;\r
 import tim.prune.data.DataPoint;\r
 import tim.prune.data.TrackInfo;\r
-import tim.prune.edit.FieldEditList;\r
+import tim.prune.function.edit.FieldEditList;\r
 \r
 /**\r
  * Operation to undo the edit of a single point\r
@@ -32,8 +32,11 @@ public class UndoEditPoint implements UndoOperation
        public String getDescription()\r
        {\r
                String desc = I18nManager.getText("undo.editpoint");\r
+               String newName = _undoFieldList.getEdit(0).getValue();\r
                String pointName = _originalPoint.getWaypointName();\r
-               if (pointName != null && !pointName.equals(""))\r
+               if (newName != null && !newName.equals(""))\r
+                       desc = desc + " " + newName;\r
+               else if (pointName != null && !pointName.equals(""))\r
                        desc = desc + " " + pointName;\r
                return desc;\r
        }\r
@@ -46,7 +49,7 @@ public class UndoEditPoint implements UndoOperation
        public void performUndo(TrackInfo inTrackInfo) throws UndoException\r
        {\r
                // Restore contents of point into track\r
-               if (!inTrackInfo.getTrack().editPoint(_originalPoint, _undoFieldList))\r
+               if (!inTrackInfo.getTrack().editPoint(_originalPoint, _undoFieldList, true))\r
                {\r
                        // throw exception if failed\r
                        throw new UndoException(getDescription());\r