aboutsummaryrefslogtreecommitdiff
path: root/src/qt/bitcoingui.cpp
diff options
context:
space:
mode:
authoradlawren <adlawren010@gmail.com>2016-08-06 23:58:30 -0700
committeradlawren <adlawren010@gmail.com>2016-08-06 23:58:30 -0700
commit05242e937d3fc0144029ccf3b14f98662400dd60 (patch)
treee9facad016151e1c38935a90ebf640de2d71d594 /src/qt/bitcoingui.cpp
parent6e6ab2c3238264b34c0c83ebf703502f5ec72848 (diff)
Fix minimize and close bugs
refs #8225 To ensure the GUI closes when the "Minimize on close" window option is disabled, and the "Minimize to the tray instead of the taskbar" window option is enbaled, remove a check made against the "Minimize to the tray instead of the taskbar" value, made during GUI closure. To ensure the GUI minimizes to the taskbar when the "Minimize on close" window option is enabled, and the "Minimize to the tray instead of the taskbar" window option is disabled, minimize the GUI and ignore the closure event.
Diffstat (limited to 'src/qt/bitcoingui.cpp')
-rw-r--r--src/qt/bitcoingui.cpp11
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)