Fixed overview basic block highlighting (#1393)

This commit is contained in:
xarkes 2019-03-26 12:07:17 +01:00 committed by GitHub
parent 1710829267
commit 71ed30a604
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -53,19 +53,19 @@ void OverviewView::drawBlock(QPainter &p, GraphView::GraphBlock &block)
p.setBrush(QColor(0, 0, 0, 100));
p.drawRect(blockX + 2, blockY + 2,
block.width, block.height);
p.setPen(QPen(graphNodeColor, 1));
p.setBrush(disassemblyBackgroundColor);
p.drawRect(blockX, blockY,
block.width, block.height);
// Draw basic block highlighting/tracing
auto bb = Core()->getBBHighlighter()->getBasicBlock(block.entry);
if (bb) {
QColor color(bb->color);
color.setAlphaF(0.5);
p.setBrush(color);
p.drawRect(block.x, block.y,
block.width, block.height);
} else {
p.setBrush(disassemblyBackgroundColor);
}
p.setPen(QPen(graphNodeColor, 1));
p.drawRect(blockX, blockY,
block.width, block.height);
}
void OverviewView::paintEvent(QPaintEvent *event)