From 077462c083af241bf654d87a8aaa776834f0e3dc Mon Sep 17 00:00:00 2001 From: Glenn Smith Date: Mon, 7 Feb 2022 16:14:09 -0500 Subject: Triage view: respect "prefer graph view" setting Closes #2941 --- examples/triage/exports.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'examples/triage/exports.cpp') diff --git a/examples/triage/exports.cpp b/examples/triage/exports.cpp index 5ad63613..7b098dff 100644 --- a/examples/triage/exports.cpp +++ b/examples/triage/exports.cpp @@ -200,10 +200,16 @@ void ExportsTreeView::exportDoubleClicked(const QModelIndex& cur) ViewFrame* viewFrame = ViewFrame::viewFrameForWidget(this); if (viewFrame) { - if (m_data->GetAnalysisFunctionsForAddress(sym->GetAddress()).size() > 0) + if (BinaryNinja::Settings::Instance()->Get("ui.view.graph.preferred") && + viewFrame->getCurrentBinaryView() && + m_data->GetAnalysisFunctionsForAddress(sym->GetAddress()).size() > 0) + { viewFrame->navigate("Graph:" + viewFrame->getCurrentDataType(), sym->GetAddress()); + } else + { viewFrame->navigate("Linear:" + viewFrame->getCurrentDataType(), sym->GetAddress()); + } } } } -- cgit v1.3.1