]> gitweb.fperrin.net Git - GpsPrune.git/commitdiff
Merge branch 'allow-removing-altitudes' into fp-integration
authorFrédéric Perrin <fred@fperrin.net>
Sat, 30 Nov 2019 20:50:20 +0000 (20:50 +0000)
committerFrédéric Perrin <fred@fperrin.net>
Sat, 30 Nov 2019 20:50:20 +0000 (20:50 +0000)
1  2 
src/tim/prune/App.java

diff --combined src/tim/prune/App.java
index 2e7594178ae2b379eccffd2d3cf41bb9f6494e61,1bef98ba4497d932e331e03c4125ff73a34171c9..54f1e98632c19ef76c7fa6af0d168bf02a763d1f
@@@ -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
         */
                        + " '" + 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