UI: Make sure "Defaults" buttons aren't default buttons
This commit is contained in:
parent
aedb85f5d3
commit
14e41dc0c1
@ -87,8 +87,9 @@ OBSBasicFilters::OBSBasicFilters(QWidget *parent, OBSSource source_)
|
||||
SLOT(EffectFilterNameEdited(QWidget*,
|
||||
QAbstractItemDelegate::EndEditHint)));
|
||||
|
||||
connect(ui->buttonBox->button(QDialogButtonBox::Close),
|
||||
SIGNAL(clicked()), this, SLOT(close()));
|
||||
QPushButton *close = ui->buttonBox->button(QDialogButtonBox::Close);
|
||||
connect(close, SIGNAL(clicked()), this, SLOT(close()));
|
||||
close->setDefault(true);
|
||||
|
||||
ui->buttonBox->button(QDialogButtonBox::Reset)->setText(
|
||||
QTStr("Defaults"));
|
||||
|
@ -49,11 +49,14 @@ OBSBasicProperties::OBSBasicProperties(QWidget *parent, OBSSource source_)
|
||||
int cy = (int)config_get_int(App()->GlobalConfig(), "PropertiesWindow",
|
||||
"cy");
|
||||
|
||||
buttonBox->addButton(QTStr("OK"), QDialogButtonBox::AcceptRole);
|
||||
QPushButton *b;
|
||||
b = buttonBox->addButton(QTStr("OK"), QDialogButtonBox::AcceptRole);
|
||||
buttonBox->addButton(QTStr("Cancel"), QDialogButtonBox::RejectRole);
|
||||
buttonBox->addButton(QTStr("Defaults"), QDialogButtonBox::ResetRole);
|
||||
buttonBox->setObjectName(QStringLiteral("buttonBox"));
|
||||
|
||||
b->setDefault(true);
|
||||
|
||||
if (cx > 400 && cy > 400)
|
||||
resize(cx, cy);
|
||||
else
|
||||
|
Loading…
x
Reference in New Issue
Block a user