Skip to content

Commit

Permalink
Redraw bubbles even if arrows are hidden.
Browse files Browse the repository at this point in the history
  • Loading branch information
bruntib committed Jan 3, 2018
1 parent de861f3 commit d225a92
Showing 1 changed file with 19 additions and 9 deletions.
28 changes: 19 additions & 9 deletions www/scripts/codecheckerviewer/BugViewer.js
Original file line number Diff line number Diff line change
Expand Up @@ -211,9 +211,15 @@ function (declare, domClass, dom, style, fx, Toggler, on, query, Memory,
this._refresh();
},

drawBugPath : function () {
drawBugPath : function (linesNeeded, bubblesNeeded) {
var that = this;

if (linesNeeded === undefined) linesNeeded = true;
if (bubblesNeeded === undefined) bubblesNeeded = true;

if (!linesNeeded && !bubblesNeeded)
return;

this.clearBubbles();
this.clearLines();

Expand All @@ -234,9 +240,13 @@ function (declare, domClass, dom, style, fx, Toggler, on, query, Memory,
points.forEach(function (point) { --point.startCol; });
points.forEach(function (bubble) { --bubble.startCol; });

that.addBubbles(bubbles);
that.addOtherFileBubbles(reportDetails.executionPath);
that.addLines(points);
if (bubblesNeeded) {
that.addBubbles(bubbles);
that.addOtherFileBubbles(reportDetails.executionPath);
}

if (linesNeeded)
that.addLines(points);
},

addBubbles : function (bubbles) {
Expand Down Expand Up @@ -621,18 +631,18 @@ function (declare, domClass, dom, style, fx, Toggler, on, query, Memory,
if (isOtherFile || isOtherReport)
// TODO: Now arrows are redrawn only if new file is opened. But what if
// in the same file the path goes out of the CodeMirror-rendered area?
if (this.buttonPane.showArrowCheckbox.get('checked'))
this.editor.drawBugPath();
this.editor.drawBugPath(
this.buttonPane.showArrowCheckbox.get('checked'));

this.editor.jumpTo(line, column);

var eventToMark;
if (item.bugPathEvent) {
eventToMark = item.bugPathEvent;
}else{
} else {
eventToMark = {
startLine : item.report.line, startCol : item.report.column,
endLine : item.report.line, endCol : item.report.column
startLine : item.report.line, startCol : item.report.column,
endLine : item.report.line, endCol : item.report.column
};
}
this.editor.highlightBugPathEvent(eventToMark);
Expand Down

0 comments on commit d225a92

Please sign in to comment.