Fixed the buttons in the hard reset dialog.
This commit is contained in:
@@ -656,8 +656,8 @@ void MainWindow::on_actionHard_Reset_triggered() {
|
|||||||
if (confirm_reset)
|
if (confirm_reset)
|
||||||
{
|
{
|
||||||
QMessageBox questionbox(QMessageBox::Icon::Question, "86Box", tr("Are you sure you want to hard reset the emulated machine?"), QMessageBox::NoButton, this);
|
QMessageBox questionbox(QMessageBox::Icon::Question, "86Box", tr("Are you sure you want to hard reset the emulated machine?"), QMessageBox::NoButton, this);
|
||||||
questionbox.addButton(tr("Reset"), QMessageBox::RejectRole);
|
questionbox.addButton(tr("Reset"), QMessageBox::AcceptRole);
|
||||||
questionbox.addButton(tr("Don't reset"), QMessageBox::AcceptRole);
|
questionbox.addButton(tr("Don't reset"), QMessageBox::RejectRole);
|
||||||
QCheckBox *chkbox = new QCheckBox(tr("Don't show this message again"));
|
QCheckBox *chkbox = new QCheckBox(tr("Don't show this message again"));
|
||||||
questionbox.setCheckBox(chkbox);
|
questionbox.setCheckBox(chkbox);
|
||||||
chkbox->setChecked(!confirm_reset);
|
chkbox->setChecked(!confirm_reset);
|
||||||
@@ -666,7 +666,7 @@ void MainWindow::on_actionHard_Reset_triggered() {
|
|||||||
confirm_reset = (state == Qt::CheckState::Unchecked);
|
confirm_reset = (state == Qt::CheckState::Unchecked);
|
||||||
});
|
});
|
||||||
questionbox.exec();
|
questionbox.exec();
|
||||||
if (questionbox.result() == QDialog::Rejected)
|
if (questionbox.result() == QDialog::Accepted)
|
||||||
{
|
{
|
||||||
confirm_reset = true;
|
confirm_reset = true;
|
||||||
return;
|
return;
|
||||||
|
Reference in New Issue
Block a user