From: Frédéric Perrin Date: Sat, 30 Nov 2019 20:50:20 +0000 (+0000) Subject: Merge branch 'allow-removing-altitudes' into fp-integration X-Git-Tag: v19.2.fp1~2 X-Git-Url: http://gitweb.fperrin.net/?p=GpsPrune.git;a=commitdiff_plain;h=a31ee8e107fd7ea6413c1a998072da3c3cfcc3b7;hp=-c Merge branch 'allow-removing-altitudes' into fp-integration --- a31ee8e107fd7ea6413c1a998072da3c3cfcc3b7 diff --combined src/tim/prune/App.java index 2e75941,1bef98b..54f1e98 --- a/src/tim/prune/App.java +++ b/src/tim/prune/App.java @@@ -454,6 -454,22 +454,22 @@@ public class Ap } + /** + * 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 */ @@@ -759,8 -775,6 +775,8 @@@ + " '" + inSourceInfo.getName() + "'"); // update menu _menuManager.informFileLoaded(); + // recentre viewport on new file data + _viewport.recentreViewport(); // Remove busy lock _busyLoading = false; // load next file if there's a queue