macos: hww: fix UI unresponsiveness

This commit is contained in:
tobtoht 2023-12-13 15:24:02 +01:00
parent de5642011e
commit 94e7e43dfe
No known key found for this signature in database
GPG key ID: E45B10DD027D2472

View file

@ -765,6 +765,14 @@ void MainWindow::onTransactionCreated(PendingTransaction *tx, const QVector<QStr
}
if (tx->status() != PendingTransaction::Status_Ok) {
if (m_showDeviceError) {
// The hardware devices has disconnected during tx construction.
// Due to a macOS-specific Qt bug, we have to prevent it from stacking two QMessageBoxes, otherwise
// the UI becomes unresponsive. The reconnect dialog should take priority.
m_wallet->disposeTransaction(tx);
return;
}
QString errMsg = tx->errorString();
Utils::Message message{this, Utils::ERROR, "Failed to construct transaction", errMsg};