diff --git a/rpcs3/rpcs3qt/debugger_frame.cpp b/rpcs3/rpcs3qt/debugger_frame.cpp index f3a513d43c..e9d0044bf4 100644 --- a/rpcs3/rpcs3qt/debugger_frame.cpp +++ b/rpcs3/rpcs3qt/debugger_frame.cpp @@ -88,6 +88,9 @@ debugger_frame::debugger_frame(QWidget *parent) : QDockWidget(tr("Debugger"), pa }); connect(m_choice_units, static_cast(&QComboBox::activated), this, &debugger_frame::UpdateUI); connect(m_choice_units, static_cast(&QComboBox::currentIndexChanged), this, &debugger_frame::OnSelectUnit); + connect(m_choice_units, static_cast(&QComboBox::currentIndexChanged), m_list, [=](int index) { + m_list->m_noThreadSelected = m_choice_units->itemText(index) == NoThread ? true : false; + }); connect(this, &QDockWidget::visibilityChanged, this, &debugger_frame::EnableUpdateTimer); m_list->ShowAddr(CentrePc(m_list->m_pc)); @@ -200,6 +203,7 @@ void debugger_frame::UpdateUnitList() QVariant old_cpu = m_choice_units->currentData(); m_choice_units->clear(); + m_choice_units->addItem(NoThread); const auto on_select = [&](u32, cpu_thread& cpu) { @@ -224,7 +228,7 @@ void debugger_frame::UpdateUnitList() void debugger_frame::OnSelectUnit() { - if (m_choice_units->count() < 1 || m_current_choice == m_choice_units->currentText()) return; + if (m_choice_units->count() < 1 || m_current_choice == m_choice_units->currentText() || m_choice_units->currentText() == NoThread) return; m_current_choice = m_choice_units->currentText(); @@ -525,7 +529,7 @@ void debugger_list::keyPressEvent(QKeyEvent* event) void debugger_list::mouseDoubleClickEvent(QMouseEvent* event) { - if (event->button() == Qt::LeftButton && !Emu.IsStopped()) + if (event->button() == Qt::LeftButton && !Emu.IsStopped() && !m_noThreadSelected) { long i = currentRow(); if (i < 0) return; diff --git a/rpcs3/rpcs3qt/debugger_frame.h b/rpcs3/rpcs3qt/debugger_frame.h index 3d5a8489be..e1be8cc10f 100644 --- a/rpcs3/rpcs3qt/debugger_frame.h +++ b/rpcs3/rpcs3qt/debugger_frame.h @@ -46,6 +46,7 @@ class debugger_frame : public QDockWidget QPushButton* m_btn_pause; QComboBox* m_choice_units; QString m_current_choice; + bool m_noThreadSelected = true; u64 m_threads_created = 0; u64 m_threads_deleted = 0; @@ -54,6 +55,8 @@ class debugger_frame : public QDockWidget QTimer* update; + const QString NoThread = "No Thread"; + public: std::unique_ptr m_disasm; std::weak_ptr cpu; @@ -96,6 +99,7 @@ class debugger_list : public QListWidget public: u32 m_pc; u32 m_item_count; + bool m_noThreadSelected; public: debugger_list(debugger_frame* parent);