From b9c7dacbd106197212822c2fcc406134f23caf44 Mon Sep 17 00:00:00 2001 From: Dan McCarthy Date: Sat, 30 Dec 2023 20:05:58 -0600 Subject: [PATCH] Debugger: Double clicking Memory Search result switches to memory view tab Previously when double clicking a memory search result it would go to the address but not switch to the memory view tab if the user wasn't already on it. Now it ensures the user moves to the memory view widget, as this is almost always going to be the user's intention. --- pcsx2-qt/Debugger/CpuWidget.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pcsx2-qt/Debugger/CpuWidget.cpp b/pcsx2-qt/Debugger/CpuWidget.cpp index 5b050fc188..2ebd240de9 100644 --- a/pcsx2-qt/Debugger/CpuWidget.cpp +++ b/pcsx2-qt/Debugger/CpuWidget.cpp @@ -102,7 +102,11 @@ CpuWidget::CpuWidget(QWidget* parent, DebugInterface& cpu) m_ui.listSearchResults->setContextMenuPolicy(Qt::CustomContextMenu); connect(m_ui.btnSearch, &QPushButton::clicked, this, &CpuWidget::onSearchButtonClicked); connect(m_ui.btnFilterSearch, &QPushButton::clicked, this, &CpuWidget::onSearchButtonClicked); - connect(m_ui.listSearchResults, &QListWidget::itemDoubleClicked, [this](QListWidgetItem* item) { m_ui.memoryviewWidget->gotoAddress(item->text().toUInt(nullptr, 16)); }); + connect(m_ui.listSearchResults, &QListWidget::itemDoubleClicked, [this](QListWidgetItem* item) + { + m_ui.tabWidget->setCurrentWidget(m_ui.tab_memory); + m_ui.memoryviewWidget->gotoAddress(item->text().toUInt(nullptr, 16)); + }); connect(m_ui.listSearchResults->verticalScrollBar(), &QScrollBar::valueChanged, this, &CpuWidget::onSearchResultsListScroll); connect(m_ui.listSearchResults, &QListView::customContextMenuRequested, this, &CpuWidget::onListSearchResultsContextMenu); connect(m_ui.cmbSearchType, &QComboBox::currentIndexChanged, [this](int i) {