X-Git-Url: http://gitweb.fperrin.net/?p=GpsPrune.git;a=blobdiff_plain;f=tim%2Fprune%2Ffunction%2Fcompress%2FMarkAndDeleteFunction.java;fp=tim%2Fprune%2Ffunction%2Fcompress%2FMarkAndDeleteFunction.java;h=dddc897480942648b603569c325b226f3831089f;hp=2189ecb8c46d664a0b88ac897f21c0a63481de9f;hb=0a2480df5845e2d7190dfdec9b2653b1609e853d;hpb=2154b1969ac2995cca46546f217f53c066b0b749 diff --git a/tim/prune/function/compress/MarkAndDeleteFunction.java b/tim/prune/function/compress/MarkAndDeleteFunction.java index 2189ecb..dddc897 100644 --- a/tim/prune/function/compress/MarkAndDeleteFunction.java +++ b/tim/prune/function/compress/MarkAndDeleteFunction.java @@ -3,6 +3,7 @@ package tim.prune.function.compress; import javax.swing.JOptionPane; import tim.prune.App; +import tim.prune.FunctionLibrary; import tim.prune.GenericFunction; import tim.prune.I18nManager; @@ -39,13 +40,23 @@ public abstract class MarkAndDeleteFunction extends GenericFunction I18nManager.getText(getNameKey()), JOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.WARNING_MESSAGE, null, buttonTexts, buttonTexts[1]); if (answer == JOptionPane.CANCEL_OPTION) {_automaticallyDelete = true;} // "always" is third option + + // Make sure function knows what to do, whether we'll call it now or later + FunctionLibrary.FUNCTION_DELETE_MARKED_POINTS.setParentFunction( + getNameKey(), getShouldSplitSegments()); if (_automaticallyDelete || answer == JOptionPane.YES_OPTION) { new Thread(new Runnable() { - public void run() { - _app.finishCompressTrack(); + public void run() + { + FunctionLibrary.FUNCTION_DELETE_MARKED_POINTS.begin(); } }).start(); } } + + /** by default, segments are not split at deleted points */ + protected boolean getShouldSplitSegments() { + return false; + } }