Skip to content

Commit f556c63

Browse files
committed
SwingTaskMonitorComponent: fix field access bug
Gotta use the class field, not the local variable. Otherwise the class's enableCancelConfirmation and disableCancelConfirmation have no effect.
1 parent 5107fd3 commit f556c63

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/org/scijava/ui/swing/task/SwingTaskMonitorComponent.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ public void mouseClicked(java.awt.event.MouseEvent evt) {
202202
if (row >= 0 && col == 1) {
203203
Task selectedTask = taskTableModel.getTask(row);
204204
if (selectedTask!=null) {
205-
if (confirmBeforeCancel) {
205+
if (SwingTaskMonitorComponent.this.confirmBeforeCancel) {
206206
int userconfirmation = JOptionPane.showConfirmDialog(null, "Do you really want to cancel this task ?", "Canceling " + selectedTask.getName(), JOptionPane.YES_NO_OPTION);
207207
if (userconfirmation == JOptionPane.YES_OPTION) {
208208
selectedTask.cancel("User cancellation (table task)");

0 commit comments

Comments
 (0)