#12001 make message boxes modal on Mac

This commit is contained in:
Stephan Witt 2023-08-02 17:59:46 +02:00
parent 5ff4e506bc
commit 550c79215b

View File

@ -113,6 +113,9 @@ buttonid doPrompt(docstring const & title, docstring const & question,
QMessageBox msg_box(QMessageBox::Information, QMessageBox msg_box(QMessageBox::Information,
toqstr(title), toqstr(question), toqstr(title), toqstr(question),
QMessageBox::NoButton, qApp->focusWidget()); QMessageBox::NoButton, qApp->focusWidget());
#ifdef Q_OS_MAC
msg_box.setWindowModality(Qt::WindowModal);
#endif
b[0] = msg_box.addButton(b1.empty() ? "OK" : toqstr(b1), b[0] = msg_box.addButton(b1.empty() ? "OK" : toqstr(b1),
QMessageBox::ActionRole); QMessageBox::ActionRole);
if (!b2.empty()) if (!b2.empty())