From: Christoph Egger Date: Tue, 26 May 2015 18:42:37 +0000 (+0200) Subject: Alwas make the first BasicBlock visible X-Git-Tag: v0.2~3 X-Git-Url: https://git.siccegge.de//index.cgi?a=commitdiff_plain;h=01cbeaf636962d976c85028f8f9e0b2afa4a5c69;p=frida%2Ffrida.git Alwas make the first BasicBlock visible --- diff --git a/src/gui/widgets/FunctionWidget.cxx b/src/gui/widgets/FunctionWidget.cxx index c9c28d1..0d931ad 100644 --- a/src/gui/widgets/FunctionWidget.cxx +++ b/src/gui/widgets/FunctionWidget.cxx @@ -41,8 +41,8 @@ void FunctionWidget::showEvent(QShowEvent* event) { } std::map _blocks; - local__add_basic_block(block, mainwindow, - manager, _blocks, scene, 3*start_address, 100); + BasicBlockWidget* firstblock = local__add_basic_block(block, mainwindow, + manager, _blocks, scene, 3*start_address, 100); QGraphicsView * view = new QGraphicsView(scene); view->setDragMode(QGraphicsView::ScrollHandDrag); @@ -54,6 +54,7 @@ void FunctionWidget::showEvent(QShowEvent* event) { t->horizontalHeader()->setSectionResizeMode(QHeaderView::ResizeToContents); addTab(t, "Listing"); + view->ensureVisible(firstblock); layouted = true; } }