X-Git-Url: http://gitweb.fperrin.net/?a=blobdiff_plain;f=tim%2Fprune%2Fundo%2FUndoEditPoint.java;h=228795b6d5d5d34e0b15d9bf7e955fc5f3544345;hb=1ee49ae3c8ef3aa2e63eadd458531e5f8bd4f92c;hp=a9f566531a37c3efd11ede111846dee844efedb1;hpb=5625a1abadb5f2ca5f017fe7dbda1d5141cb637b;p=GpsPrune.git diff --git a/tim/prune/undo/UndoEditPoint.java b/tim/prune/undo/UndoEditPoint.java index a9f5665..228795b 100644 --- a/tim/prune/undo/UndoEditPoint.java +++ b/tim/prune/undo/UndoEditPoint.java @@ -3,7 +3,7 @@ package tim.prune.undo; import tim.prune.I18nManager; import tim.prune.data.DataPoint; import tim.prune.data.TrackInfo; -import tim.prune.edit.FieldEditList; +import tim.prune.function.edit.FieldEditList; /** * Operation to undo the edit of a single point @@ -32,8 +32,11 @@ public class UndoEditPoint implements UndoOperation public String getDescription() { String desc = I18nManager.getText("undo.editpoint"); + String newName = _undoFieldList.getEdit(0).getValue(); String pointName = _originalPoint.getWaypointName(); - if (pointName != null && !pointName.equals("")) + if (newName != null && !newName.equals("")) + desc = desc + " " + newName; + else if (pointName != null && !pointName.equals("")) desc = desc + " " + pointName; return desc; } @@ -46,7 +49,7 @@ public class UndoEditPoint implements UndoOperation public void performUndo(TrackInfo inTrackInfo) throws UndoException { // Restore contents of point into track - if (!inTrackInfo.getTrack().editPoint(_originalPoint, _undoFieldList)) + if (!inTrackInfo.getTrack().editPoint(_originalPoint, _undoFieldList, true)) { // throw exception if failed throw new UndoException(getDescription());