Skip to content

Commit cda881a

Browse files
committed
qt: Delay shutdown while a modal dialog is active
1 parent 97692af commit cda881a

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/qt/bitcoin.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,11 @@ void BitcoinApplication::createWindow(const NetworkStyle *networkStyle)
265265
connect(window, &BitcoinGUI::quitRequested, this, &BitcoinApplication::requestShutdown);
266266

267267
pollShutdownTimer = new QTimer(window);
268-
connect(pollShutdownTimer, &QTimer::timeout, window, &BitcoinGUI::detectShutdown);
268+
connect(pollShutdownTimer, &QTimer::timeout, [this]{
269+
if (!QApplication::activeModalWidget()) {
270+
window->detectShutdown();
271+
}
272+
});
269273
}
270274

271275
void BitcoinApplication::createSplashScreen(const NetworkStyle *networkStyle)

0 commit comments

Comments
 (0)