From 4e17b6168db7d9670e9813524c95f3192126a654 Mon Sep 17 00:00:00 2001 From: Nicolas Chiaruttini Date: Sun, 10 Apr 2022 17:49:46 +0200 Subject: [PATCH] fix cancel not called when no user confirmation is required --- .../org/scijava/ui/swing/task/SwingTaskMonitorComponent.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/java/org/scijava/ui/swing/task/SwingTaskMonitorComponent.java b/src/main/java/org/scijava/ui/swing/task/SwingTaskMonitorComponent.java index 3531fe0..1a7f852 100644 --- a/src/main/java/org/scijava/ui/swing/task/SwingTaskMonitorComponent.java +++ b/src/main/java/org/scijava/ui/swing/task/SwingTaskMonitorComponent.java @@ -238,6 +238,8 @@ public void mouseClicked(java.awt.event.MouseEvent evt) { if (userconfirmation == JOptionPane.YES_OPTION) { selectedTask.cancel("User cancellation (table task)"); } + } else { + selectedTask.cancel("User cancellation (table task)"); } } }