From: Christoph Egger Date: Tue, 3 Jun 2014 17:19:51 +0000 (+0200) Subject: Distinguish single edges from double edges X-Git-Tag: v0.1~172 X-Git-Url: https://git.siccegge.de//index.cgi?a=commitdiff_plain;h=ff589cd22b761fd4990e3ad7041b47e384b9e07d;p=frida%2Ffrida.git Distinguish single edges from double edges --- diff --git a/src/gui/widgets/BasicBlockWidget.hxx b/src/gui/widgets/BasicBlockWidget.hxx index 3c61121..3c547b5 100644 --- a/src/gui/widgets/BasicBlockWidget.hxx +++ b/src/gui/widgets/BasicBlockWidget.hxx @@ -19,10 +19,15 @@ public: dx + penWidth, dy + penWidth); - if (next[0]) - result |= QRectF(QPointF(x + dx/3, y+dy), - mapFromScene(next[0]->getEntry())); - + if (next[0]) { + if (next[1]) { + result |= QRectF(QPointF(x + dx/3, y+dy), + mapFromScene(next[0]->getEntry())); + } else { + result |= QRectF(QPointF(x + dx/2, y+dy), + mapFromScene(next[0]->getEntry())); + } + } if (next[1]) result |= QRectF(QPointF(x + 2*dx/3, y+dy), mapFromScene(next[1]->getEntry())); @@ -50,11 +55,17 @@ public: if (_widget.rowCount() != 0) _widget.render(painter); - painter->setPen(QColor(0x00, 0xff, 0x00, 0xff)); - if (next[0]) - painter->drawLine(QPointF(x + dx/3, y+dy), - mapFromScene(next[0]->getEntry())); - + if (next[0]) { + if (next[1]) { + painter->setPen(QColor(0x00, 0xff, 0x00, 0xff)); + painter->drawLine(QPointF(x + dx/3, y+dy), + mapFromScene(next[0]->getEntry())); + } else { + painter->setPen(QColor(0x00, 0x00, 0x00, 0xff)); + painter->drawLine(QPointF(x + dx/2, y+dy), + mapFromScene(next[0]->getEntry())); + } + } painter->setPen(QColor(0xff, 0x00, 0x00, 0xff)); if (next[1]) painter->drawLine(QPointF(x + 2*dx/3, y+dy),