对禁止取消的操作禁用取消按钮 (#5948)

This commit is contained in:
辞庐
2026-04-17 22:12:54 +08:00
committed by GitHub
parent 1778e9d916
commit 6ef04d2fa5
@@ -81,12 +81,11 @@ public class TaskExecutorDialogPane extends BorderPane {
setCancel(cancel);
btnCancel.setDisable(onCancel.getCancellationAction() == null);
btnCancel.setOnAction(e -> {
if (onCancel.getCancellationAction() != null) {
if (executor != null)
executor.cancel();
onCancel.getCancellationAction().accept(this);
}
if (executor != null)
executor.cancel();
onCancel.getCancellationAction().accept(this);
});
speedEventHandler = FetchTask.SPEED_EVENT.registerWeak(speedEvent -> {