]> gitweb.fperrin.net Git - GpsPrune.git/blobdiff - src/tim/prune/App.java
Merge branch 'not-ready-for-upstreaming' into fp-integration
[GpsPrune.git] / src / tim / prune / App.java
index 247a1332fc6f931c0836ab0e6fdfc36a563cec07..317064d39984acb566cee90940236c52c32fd58f 100644 (file)
@@ -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