X-Git-Url: https://gitweb.fperrin.net/?p=GpsPrune.git;a=blobdiff_plain;f=src%2Ftim%2Fprune%2FApp.java;h=317064d39984acb566cee90940236c52c32fd58f;hp=247a1332fc6f931c0836ab0e6fdfc36a563cec07;hb=a3cb2b5a1ffe4d027d1c896a5ef9bb3f7b280d89;hpb=32829d40884b042d44d7c51fcf509ac525efc374 diff --git a/src/tim/prune/App.java b/src/tim/prune/App.java index 247a133..317064d 100644 --- a/src/tim/prune/App.java +++ b/src/tim/prune/App.java @@ -456,6 +456,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 */ @@ -761,6 +777,8 @@ public class App + " '" + inSourceInfo.getName() + "'"); // update menu _menuManager.informFileLoaded(); + // recentre viewport on new file data + _viewport.recentreViewport(); // update main window title updateTitle(); // Remove busy lock