X-Git-Url: https://gitweb.fperrin.net/?p=GpsPrune.git;a=blobdiff_plain;f=tim%2Fprune%2Ffunction%2Fcompress%2FCompressTrackFunction.java;h=5aa76aa76a1c570c89330fafab5192a329082b8a;hp=865faeb4f4ae6a576aa2dfd80dd2a8e81e5c9c15;hb=4d5796d02a15808311c09448d79e6e7d1de9d636;hpb=54b9d8bc8f0025ccf97a67d9dd217ef1f9cf082f diff --git a/tim/prune/function/compress/CompressTrackFunction.java b/tim/prune/function/compress/CompressTrackFunction.java index 865faeb..5aa76aa 100644 --- a/tim/prune/function/compress/CompressTrackFunction.java +++ b/tim/prune/function/compress/CompressTrackFunction.java @@ -11,6 +11,7 @@ import javax.swing.Box; import javax.swing.BoxLayout; import javax.swing.JButton; import javax.swing.JDialog; +import javax.swing.JOptionPane; import javax.swing.JPanel; import tim.prune.App; @@ -72,7 +73,6 @@ public class CompressTrackFunction extends GenericFunction */ private boolean[] preview() { - // System.out.println("track dialog preview"); int numToDelete = 0; boolean[] deleteFlags = new boolean[_track.getNumPoints()]; for (int i=0; i<_algorithms.length; i++) @@ -157,7 +157,8 @@ public class CompressTrackFunction extends GenericFunction new DuplicatePointAlgorithm(_track, details, changeListener), new ClosePointsAlgorithm(_track, details, changeListener), new WackyPointAlgorithm(_track, details, changeListener), - new SingletonAlgorithm(_track, details, changeListener) + new SingletonAlgorithm(_track, details, changeListener), + new DouglasPeuckerAlgorithm(_track, details, changeListener) }; } @@ -169,14 +170,27 @@ public class CompressTrackFunction extends GenericFunction { boolean[] deleteFlags = preview(); // All flags are now combined in deleteFlags array + int numMarked = 0; for (int i=0; i 0) { + JOptionPane.showMessageDialog(_parentFrame, I18nManager.getText("dialog.compress.confirm1") + + " " + numMarked + " " + I18nManager.getText("dialog.compress.confirm2"), + I18nManager.getText(getNameKey()), JOptionPane.INFORMATION_MESSAGE); + } + else { + JOptionPane.showMessageDialog(_parentFrame, I18nManager.getText("dialog.compress.confirmnone"), + I18nManager.getText(getNameKey()), JOptionPane.INFORMATION_MESSAGE); + } } }