]> git.siccegge.de Git - frida/frida.git/blobdiff - src/gui/Mainwindow.cxx
Horizontally distribute BasicBlockWidgets
[frida/frida.git] / src / gui / Mainwindow.cxx
index 9a8310c4e00bfbe500270330f37f9a02346d591d..f98cd60a226888da2f780af6c3dc924cdde6a45b 100644 (file)
@@ -102,10 +102,13 @@ namespace {
                BasicBlockWidget *tmp, *nextl(NULL), *nextr(NULL);
                BasicBlock * tmpblock;
                if (block->getNextBlock(0) != 0) {
+                       int xshift = 0;
+                       if (block->getNextBlock(1) != 0)
+                               xshift = 1;
                        tmpblock = dis->getBasicBlock(block->getNextBlock(0));
                        tmp = local__add_basic_block(tmpblock, dis,
                                                                                 known_blocks,
-                                                                                scene, starty, startx+1);
+                                                                                scene, starty, startx+xshift);
                        nextl = tmp;
                        tmp->addPrevious(widget);
                }