]> Nutra Git (v1) - gamesguru/feather.git/commitdiff
macos: hww: fix UI unresponsiveness
authortobtoht <tob@featherwallet.org>
Wed, 13 Dec 2023 14:24:02 +0000 (15:24 +0100)
committertobtoht <tob@featherwallet.org>
Wed, 13 Dec 2023 14:24:02 +0000 (15:24 +0100)
src/MainWindow.cpp

index 7db1f1d94563eba07a27ef2c255b598e8fd3db85..39d47e506662239ce60fd8d5a50dfb3d958f45ec 100644 (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};