From 211bf464a368e05e8c0aa8804d631822f1d6629f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=A4rkl?= Date: Tue, 28 Nov 2017 11:34:47 +0100 Subject: [PATCH] Switch to Disassembly when there is no fcn, Fix #111 --- src/cutter.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/cutter.cpp b/src/cutter.cpp index 4010c8d0..34f85a32 100644 --- a/src/cutter.cpp +++ b/src/cutter.cpp @@ -190,6 +190,13 @@ QString CutterCore::cmd(const QString &str) if (offset != core_->offset) { emit seekChanged(core_->offset); + + // switch from graph to disassembly if there is no function + if (cmdj("afij").array().isEmpty() && memoryWidgetPriority == MemoryWidgetType::Graph) + { + memoryWidgetPriority = MemoryWidgetType::Disassembly; + } + triggerRaisePrioritizedMemoryWidget(); } return o;