Skip to content

Commit 71726d7

Browse files
committed
Merge pull request #700 from sgal/master
Fix for duplicate events in the error panel
2 parents 3230c17 + d5b81fa commit 71726d7

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

lib/main/atom/views/mainPanelView.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -365,6 +365,7 @@ export class MainPanelView extends view.View<any> {
365365
private clearedError = true;
366366
clearError() {
367367
this.clearedError = true;
368+
this.clearSummary();
368369
this.errorBody.empty();
369370
}
370371

@@ -396,6 +397,11 @@ export class MainPanelView extends view.View<any> {
396397
}
397398
}
398399

400+
clearSummary() {
401+
this.summary.html('');
402+
this.summary.off();
403+
}
404+
399405
setErrorPanelErrorCount(fileErrorCount: number, totalErrorCount: number) {
400406
var title = `${panelHeaders.error} ( <span class="text-success">No Errors</span> )`;
401407
if (totalErrorCount > 0) {
@@ -407,7 +413,7 @@ export class MainPanelView extends view.View<any> {
407413
)`;
408414
}
409415
else {
410-
this.summary.html('');
416+
this.clearSummary();
411417
this.errorBody.html('<span class="text-success">No errors in open files \u2665</span>');
412418
}
413419

0 commit comments

Comments
 (0)