Fixes #10016: the spinning bar (progress indicator) doesn't appear anymore after a running task gets terminated

This commit is contained in:
Dirk Baeumer 2016-08-29 11:54:21 +02:00
parent e3219411b7
commit b5c999e33b

View file

@ -504,11 +504,17 @@ class StatusBarItem implements IStatusbarItem {
})); }));
callOnDispose.push(this.taskService.addListener2(TaskServiceEvents.Inactive, (data:TaskServiceEventData) => { callOnDispose.push(this.taskService.addListener2(TaskServiceEvents.Inactive, (data:TaskServiceEventData) => {
this.activeCount--; // Since the exiting of the sub process is communicated async we can't order inactive and terminate events.
if (this.activeCount === 0) { // So try to treat them accordingly.
$(progress).hide(); if (this.activeCount > 0) {
clearInterval(this.intervalToken); this.activeCount--;
this.intervalToken = null; if (this.activeCount === 0) {
$(progress).hide();
if (this.intervalToken) {
clearInterval(this.intervalToken);
this.intervalToken = null;
}
}
} }
})); }));