Added comments to graph view

This commit is contained in:
xarkes 2017-10-14 13:00:23 +02:00
parent 48e9767a66
commit 34ef34c581

View File

@ -1594,11 +1594,19 @@ void DisassemblerGraphView::loadCurrentGraph()
RichTextPainter::CustomRichText_t assembly; RichTextPainter::CustomRichText_t assembly;
assembly.highlight = false; assembly.highlight = false;
assembly.flags = RichTextPainter::FlagNone; assembly.flags = RichTextPainter::FlagColor;
assembly.text = op["opcode"].toString(); assembly.text = op["opcode"].toString();
richText.insert(richText.begin(), assembly); richText.insert(richText.begin(), assembly);
if (op["comment"].toString().length()) {
RichTextPainter::CustomRichText_t comment;
comment.text = QString(" ; %1").arg(QByteArray::fromBase64(op["comment"].toString().toLocal8Bit()).data());
comment.textColor = Qt::blue;
comment.flags = RichTextPainter::FlagColor;
richText.insert(richText.end(), comment);
}
i.text = Text(richText); i.text = Text(richText);
b.instrs.push_back(i); b.instrs.push_back(i);
} }