respect setting of parent checkboxes for minimizeToTray

This commit is contained in:
Frank Nießen 2015-10-08 15:13:22 +02:00
parent c93b12ff05
commit 539f86fd0b

View File

@ -470,7 +470,10 @@ void MainWindow::databaseTabChanged(int tabIndex)
void MainWindow::closeEvent(QCloseEvent* event)
{
if (config()->get("GUI/MinimizeOnClose").toBool() && !appExitCalled)
bool minimizeOnClose = config()->get("GUI/ShowTrayIcon").toBool() &&
config()->get("GUI/MinimizeToTray").toBool() &&
config()->get("GUI/MinimizeOnClose").toBool();
if (minimizeOnClose && !appExitCalled)
{
event->ignore();
hide();