\r
import tim.prune.I18nManager;\r
import tim.prune.data.DataPoint;\r
+import tim.prune.data.Field;\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
public String getDescription()\r
{\r
String desc = I18nManager.getText("undo.editpoint");\r
+ String newName = null;\r
+ if (_undoFieldList.getEdit(0).getField() == Field.WAYPT_NAME)\r
+ 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
\r
/**\r
* Perform the undo operation on the given Track\r
- * @param inTrack Track object on which to perform the operation\r
+ * @param inTrackInfo TrackInfo object on which to perform the operation\r
*/\r
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
}\r
- // TODO: Deal with photo if necessary\r
}\r
}
\ No newline at end of file