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.
This commit is contained in:
parent
6e6ab2c323
commit
05242e937d
1 changed files with 8 additions and 3 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue