修复 TaskListPane 中任务总数显示错误的问题 (#4310)

This commit is contained in:
Glavo 2025-08-21 20:43:19 +08:00 committed by GitHub
parent cba4ba2799
commit c9c97a45b7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -262,7 +262,7 @@ public final class TaskListPane extends StackPane {
runInFX(() -> { runInFX(() -> {
StageNode stageNode = stageNodes.get(task.getStage()); StageNode stageNode = stageNodes.get(task.getStage());
if (stageNode != null) if (stageNode != null)
stageNode.setTotal(total); stageNode.addTotal(total);
}); });
} }
} }
@ -471,8 +471,8 @@ public final class TaskListPane extends StackPane {
updateCounter(++count, total); updateCounter(++count, total);
} }
public void setTotal(int total) { public void addTotal(int n) {
this.total = total; this.total += n;
updateCounter(count, total); updateCounter(count, total);
} }