]> gitweb.fperrin.net Git - GpsPrune.git/blobdiff - src/tim/prune/App.java
Add menu item to remove altitudes from track
[GpsPrune.git] / src / tim / prune / App.java
index 3a778588ab815a7f30c4b396e4de9d2c266836da..1bef98ba4497d932e331e03c4125ff73a34171c9 100644 (file)
@@ -454,6 +454,22 @@ public class App
        }
 
 
+       /**
+        * Remove altitudes from selected points
+        */
+       public void removeAltitudes(int selStart, int selEnd)
+       {
+               UndoRemoveAltitudes undo = new UndoRemoveAltitudes(_trackInfo, selStart, selEnd);
+               if (_trackInfo.getTrack().removeAltitudes(selStart, selEnd))
+               {
+                       _undoStack.add(undo);
+                       _trackInfo.getSelection().markInvalid();
+                       UpdateMessageBroker.informSubscribers(DataSubscriber.DATA_EDITED);
+                       UpdateMessageBroker.informSubscribers(I18nManager.getText("confirm.removealtitudes"));
+               }
+       }
+
+
        /**
         * Merge the track segments within the current selection
         */