]> git.siccegge.de Git - frida/frida.git/commitdiff
Distinguish single edges from double edges
authorChristoph Egger <siccegge@cs.fau.de>
Tue, 3 Jun 2014 17:19:51 +0000 (19:19 +0200)
committerChristoph Egger <siccegge@cs.fau.de>
Tue, 3 Jun 2014 17:19:51 +0000 (19:19 +0200)
src/gui/widgets/BasicBlockWidget.hxx

index 3c61121c75fa3da7f7e55894dc723c3f15e2e5be..3c547b558ef10750c55d14201c30fb391565d858 100644 (file)
@@ -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),