qt: Prevent non-functional GUI from popping up during Init
When a InitError or InitWarning happens, the GUI pops up but is unusable (until Init finishes). This is caused by showNormalIfMinimized. Add a message flag to skip this call for Init errors or warnings.
This commit is contained in:
@@ -681,8 +681,11 @@ void BitcoinGUI::message(const QString &title, const QString &message, unsigned
|
||||
if (!(buttons = (QMessageBox::StandardButton)(style & CClientUIInterface::BTN_MASK)))
|
||||
buttons = QMessageBox::Ok;
|
||||
|
||||
// Ensure we get users attention
|
||||
showNormalIfMinimized();
|
||||
// Ensure we get users attention, but only if main window is visible
|
||||
// as we don't want to pop up the main window for messages that happen before
|
||||
// initialization is finished.
|
||||
if(!(style & CClientUIInterface::NOSHOWGUI))
|
||||
showNormalIfMinimized();
|
||||
QMessageBox mBox((QMessageBox::Icon)nMBoxIcon, strTitle, message, buttons, this);
|
||||
int r = mBox.exec();
|
||||
if (ret != NULL)
|
||||
|
||||
Reference in New Issue
Block a user