From e4cea538f03c98689830724fde1455a8d85b4ccc Mon Sep 17 00:00:00 2001 From: =?utf8?q?Fr=C3=A9d=C3=A9ric=20Perrin?= Date: Sun, 30 Dec 2018 13:39:17 +0000 Subject: [PATCH] Duplicate point before converting it to waypoint --- src/tim/prune/function/edit/PointNameEditor.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/tim/prune/function/edit/PointNameEditor.java b/src/tim/prune/function/edit/PointNameEditor.java index 9e6e343..ca5771d 100644 --- a/src/tim/prune/function/edit/PointNameEditor.java +++ b/src/tim/prune/function/edit/PointNameEditor.java @@ -208,8 +208,11 @@ public class PointNameEditor extends GenericFunction { // If a new name has been added, changing the point // from trackpoint to waypoint, duplicate it - _app.createPoint(_point.clonePoint()); - + if (wasNameAdded()) + { + _app.createPoint(_point.clonePoint()); + } + // make lists for edit and undo, and add the changed field FieldEditList editList = new FieldEditList(); FieldEditList undoList = new FieldEditList(); -- 2.43.0