X-Git-Url: http://gitweb.fperrin.net/?p=GpsPrune.git;a=blobdiff_plain;f=tim%2Fprune%2FApp.java;fp=tim%2Fprune%2FApp.java;h=81e59cc69b23566e040406ffe6f93f0023e9ea6d;hp=7be82425ddc3e1628cf0d2c62343d3d50e7c3e47;hb=0a2480df5845e2d7190dfdec9b2653b1609e853d;hpb=2154b1969ac2995cca46546f217f53c066b0b749 diff --git a/tim/prune/App.java b/tim/prune/App.java index 7be8242..81e59cc 100644 --- a/tim/prune/App.java +++ b/tim/prune/App.java @@ -4,7 +4,6 @@ import java.io.File; import java.util.ArrayList; import java.util.EmptyStackException; import java.util.Set; -import java.util.Stack; import javax.swing.JFrame; import javax.swing.JOptionPane; @@ -27,8 +26,6 @@ import tim.prune.data.Unit; import tim.prune.function.AsyncMediaLoader; import tim.prune.function.SaveConfig; import tim.prune.function.SelectTracksFunction; -import tim.prune.function.browser.BrowserLauncher; -import tim.prune.function.browser.UrlGenerator; import tim.prune.function.edit.FieldEditList; import tim.prune.function.edit.PointEditor; import tim.prune.gui.MenuManager; @@ -121,7 +118,7 @@ public class App /** * @return the undo stack */ - public Stack getUndoStack() + public UndoStack getUndoStack() { return _undoStack; } @@ -303,7 +300,7 @@ public class App // pass to track for completion if (_track.editPoint(currentPoint, inEditList, false)) { - _undoStack.push(undo); + _undoStack.add(undo); // Confirm point edit UpdateMessageBroker.informSubscribers(I18nManager.getText("confirm.point.edit")); } @@ -351,7 +348,7 @@ public class App if (_trackInfo.deletePoint()) { // Delete was successful so add undo info to stack - _undoStack.push(undo); + _undoStack.add(undo); if (currentPhoto != null) { // delete photo if necessary @@ -378,27 +375,6 @@ public class App } - /** - * Finish the compression by deleting the marked points - */ - public void finishCompressTrack() - { - UndoDeleteMarked undo = new UndoDeleteMarked(_track); - // call track to do compress - int numPointsDeleted = _trackInfo.deleteMarkedPoints(); - // add to undo stack if successful - if (numPointsDeleted > 0) - { - undo.setNumPointsDeleted(numPointsDeleted); - _undoStack.add(undo); - UpdateMessageBroker.informSubscribers("" + numPointsDeleted + " " - + (numPointsDeleted==1?I18nManager.getText("confirm.deletepoint.single"):I18nManager.getText("confirm.deletepoint.multi"))); - } - else { - showErrorMessage("function.compress", "dialog.deletemarked.nonefound"); - } - } - /** * Reverse the currently selected section of the track */ @@ -891,7 +867,7 @@ public class App } else { - new UndoManager(this, _frame); + new UndoManager(this, _frame).show(); } } @@ -931,7 +907,7 @@ public class App { for (int i=0; i