diff options
author | Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> | 2022-02-08 17:25:39 +0200 |
---|---|---|
committer | Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> | 2022-02-12 23:00:45 +0200 |
commit | 89c277a6fca1149f10f8b55874c702c341679765 (patch) | |
tree | 8608b73875899202644026584e7694534158a535 /src/qt/bitcoin.cpp | |
parent | 8c0eb80f41bca7b08c94de0f08692fac23e3e9f0 (diff) |
qt: Delay shutdown while a modal dialog is active
Diffstat (limited to 'src/qt/bitcoin.cpp')
-rw-r--r-- | src/qt/bitcoin.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/qt/bitcoin.cpp b/src/qt/bitcoin.cpp index 6a2781079c..eb31287c56 100644 --- a/src/qt/bitcoin.cpp +++ b/src/qt/bitcoin.cpp @@ -268,7 +268,11 @@ void BitcoinApplication::createWindow(const NetworkStyle *networkStyle) connect(window, &BitcoinGUI::quitRequested, this, &BitcoinApplication::requestShutdown); pollShutdownTimer = new QTimer(window); - connect(pollShutdownTimer, &QTimer::timeout, window, &BitcoinGUI::detectShutdown); + connect(pollShutdownTimer, &QTimer::timeout, [this]{ + if (!QApplication::activeModalWidget()) { + window->detectShutdown(); + } + }); } void BitcoinApplication::createSplashScreen(const NetworkStyle *networkStyle) |