From 99b3ac21e4e51664a67a07c1c6c175a67a352e9d Mon Sep 17 00:00:00 2001 From: Pokechu22 Date: Mon, 31 Jan 2022 10:12:55 -0800 Subject: [PATCH] NewBreakpointDialog: Fix improperly behaving radio buttons --- Source/Core/DolphinQt/Debugger/NewBreakpointDialog.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Source/Core/DolphinQt/Debugger/NewBreakpointDialog.cpp b/Source/Core/DolphinQt/Debugger/NewBreakpointDialog.cpp index 6a1a3eff7b..3e8bfae69a 100644 --- a/Source/Core/DolphinQt/Debugger/NewBreakpointDialog.cpp +++ b/Source/Core/DolphinQt/Debugger/NewBreakpointDialog.cpp @@ -3,6 +3,7 @@ #include "DolphinQt/Debugger/NewBreakpointDialog.h" +#include #include #include #include @@ -31,10 +32,12 @@ NewBreakpointDialog::NewBreakpointDialog(BreakpointWidget* parent) void NewBreakpointDialog::CreateWidgets() { m_buttons = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel); + auto* type_group = new QButtonGroup(this); // Instruction BP m_instruction_bp = new QRadioButton(tr("Instruction Breakpoint")); m_instruction_bp->setChecked(true); + type_group->addButton(m_instruction_bp); m_instruction_box = new QGroupBox; m_instruction_address = new QLineEdit; @@ -45,11 +48,15 @@ void NewBreakpointDialog::CreateWidgets() // Memory BP m_memory_bp = new QRadioButton(tr("Memory Breakpoint")); + type_group->addButton(m_memory_bp); m_memory_box = new QGroupBox; + auto* memory_type_group = new QButtonGroup(this); m_memory_use_address = new QRadioButton(tr("Address")); m_memory_use_address->setChecked(true); + memory_type_group->addButton(m_memory_use_address); // i18n: A range of memory addresses m_memory_use_range = new QRadioButton(tr("Range")); + memory_type_group->addButton(m_memory_use_range); m_memory_address_from = new QLineEdit; m_memory_address_to = new QLineEdit; m_memory_address_from_label = new QLabel; // Set by OnAddressTypeChanged