Skip to content

Commit

Permalink
NewBreakpointDialog: Fix improperly behaving radio buttons
Browse files Browse the repository at this point in the history
  • Loading branch information
Pokechu22 committed Feb 12, 2022
1 parent a05dd6b commit 99b3ac2
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Source/Core/DolphinQt/Debugger/NewBreakpointDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

#include "DolphinQt/Debugger/NewBreakpointDialog.h"

#include <QButtonGroup>
#include <QCheckBox>
#include <QDialogButtonBox>
#include <QGridLayout>
Expand Down Expand Up @@ -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;

Expand All @@ -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
Expand Down

0 comments on commit 99b3ac2

Please sign in to comment.