diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2016-08-11 15:22:56 +0200 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2016-08-11 15:23:05 +0200 |
commit | 0d0abcac1efeb94f441aa13714ba01ccfacc05c0 (patch) | |
tree | 48190566be81ec3eafb2097993295ed5b9462f57 /src | |
parent | edebf425a2df2cf3bd537d26a1c0797f7298a5bc (diff) | |
parent | 05242e937d3fc0144029ccf3b14f98662400dd60 (diff) | |
download | bitcoin-0d0abcac1efeb94f441aa13714ba01ccfacc05c0.tar.xz |
Merge #8481: Qt: Fix minimize and close bugs
05242e9 Fix minimize and close bugs (adlawren)
Diffstat (limited to 'src')
-rw-r--r-- | src/qt/bitcoingui.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/qt/bitcoingui.cpp b/src/qt/bitcoingui.cpp index 9042e3b56a..2afefb733e 100644 --- a/src/qt/bitcoingui.cpp +++ b/src/qt/bitcoingui.cpp @@ -902,17 +902,22 @@ void BitcoinGUI::closeEvent(QCloseEvent *event) #ifndef Q_OS_MAC // Ignored on Mac if(clientModel && clientModel->getOptionsModel()) { - if(!clientModel->getOptionsModel()->getMinimizeToTray() && - !clientModel->getOptionsModel()->getMinimizeOnClose()) + if(!clientModel->getOptionsModel()->getMinimizeOnClose()) { // close rpcConsole in case it was open to make some space for the shutdown window rpcConsole->close(); QApplication::quit(); } + else + { + QMainWindow::showMinimized(); + event->ignore(); + } } -#endif +#else QMainWindow::closeEvent(event); +#endif } void BitcoinGUI::showEvent(QShowEvent *event) |