]> gitweb.fperrin.net Git - GpsPrune.git/commitdiff
Duplicate point before converting it to waypoint
authorFrédéric Perrin <fred@fperrin.net>
Sun, 30 Dec 2018 13:39:17 +0000 (13:39 +0000)
committerFrédéric Perrin <fred@fperrin.net>
Sun, 1 Dec 2019 12:41:47 +0000 (12:41 +0000)
src/tim/prune/function/edit/PointNameEditor.java

index 9e6e343dc1357e3f0b9c753b4fd514cb21f20e1e..ca5771d45fe9886c2717127b8e80ef257a47dc8e 100644 (file)
@@ -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();