patch_manager: fix import dialog close button

This commit is contained in:
Megamouse 2020-06-30 01:14:37 +02:00
parent 6742fad753
commit 45e1a8756f
1 changed files with 4 additions and 3 deletions

View File

@ -667,9 +667,10 @@ void patch_manager_dialog::dropEvent(QDropEvent* event)
return;
}
QMessageBox box(QMessageBox::Icon::Question, tr("Patch Manager"), tr("What do you want to do with the patch file?"), QMessageBox::StandardButton::NoButton, this);
QAbstractButton* button_yes = box.addButton(tr("Import"), QMessageBox::YesRole);
QAbstractButton* button_no = box.addButton(tr("Validate"), QMessageBox::NoRole);
QMessageBox box(QMessageBox::Icon::Question, tr("Patch Manager"), tr("What do you want to do with the patch file?"), QMessageBox::StandardButton::Cancel, this);
QPushButton* button_yes = box.addButton(tr("Import"), QMessageBox::YesRole);
QPushButton* button_no = box.addButton(tr("Validate"), QMessageBox::NoRole);
box.setDefaultButton(button_yes);
box.exec();
const bool do_import = box.clickedButton() == button_yes;