From 0dff413e172bed7f1f63019d7edaf463ac96119d Mon Sep 17 00:00:00 2001 From: Vanellope Date: Sat, 9 Mar 2019 02:24:59 +0900 Subject: [PATCH] Fix a bug in seek caused by Graph refactoring (#1250) * Fixed a bug in seek --- src/widgets/DisassemblerGraphView.cpp | 1 - src/widgets/GraphWidget.cpp | 1 + src/widgets/OverviewWidget.cpp | 1 - 3 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/widgets/DisassemblerGraphView.cpp b/src/widgets/DisassemblerGraphView.cpp index 4713486b..d6ac3327 100644 --- a/src/widgets/DisassemblerGraphView.cpp +++ b/src/widgets/DisassemblerGraphView.cpp @@ -323,7 +323,6 @@ void DisassemblerGraphView::loadCurrentGraph() if (!func["blocks"].toArray().isEmpty()) { computeGraph(entry); - showBlock(blocks[entry]); } } diff --git a/src/widgets/GraphWidget.cpp b/src/widgets/GraphWidget.cpp index 6030b700..4a43d2da 100644 --- a/src/widgets/GraphWidget.cpp +++ b/src/widgets/GraphWidget.cpp @@ -25,6 +25,7 @@ GraphWidget::GraphWidget(MainWindow *main, QAction *action) : if (visibility) { Core()->setMemoryWidgetPriority(CutterCore::MemoryWidgetType::Graph); this->graphView->refreshView(); + this->graphView->onSeekChanged(Core()->getOffset()); } }); diff --git a/src/widgets/OverviewWidget.cpp b/src/widgets/OverviewWidget.cpp index 2cfc0239..e85e893b 100644 --- a/src/widgets/OverviewWidget.cpp +++ b/src/widgets/OverviewWidget.cpp @@ -16,7 +16,6 @@ OverviewWidget::OverviewWidget(MainWindow *main, QAction *action) : connect(this, &QDockWidget::visibilityChanged, this, [ = ](bool visibility) { if (visibility) { - Core()->setMemoryWidgetPriority(CutterCore::MemoryWidgetType::Graph); updateContents(); } });