Skip to content

Commit

Permalink
Fixes #10016: the spinning bar (progress indicator) doesn't appear an…
Browse files Browse the repository at this point in the history
…ymore after a running task gets terminated
  • Loading branch information
dbaeumer committed Aug 29, 2016
1 parent e321941 commit b5c999e
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions src/vs/workbench/parts/tasks/electron-browser/task.contribution.ts
Original file line number Diff line number Diff line change
Expand Up @@ -504,11 +504,17 @@ class StatusBarItem implements IStatusbarItem {
}));

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

Expand Down

0 comments on commit b5c999e

Please sign in to comment.