Fix window hiding issue (closes #589070)

This commit is contained in:
Christophe Dumez
2010-06-10 19:42:54 +00:00
parent ac3a88d3e3
commit 6070fac3f5

View File

@@ -580,6 +580,7 @@ bool GUI::event(QEvent * e) {
qDebug("minimisation");
QSettings settings(QString::fromUtf8("qBittorrent"), QString::fromUtf8("qBittorrent"));
if(systrayIcon && settings.value(QString::fromUtf8("Preferences/General/MinimizeToTray"), false).toBool()) {
if(!qApp->activeWindow() || !qApp->activeWindow()->isModal()) {
qDebug("Minimize to Tray enabled, hiding!");
e->accept();
QTimer::singleShot(0, this, SLOT(hide()));
@@ -587,6 +588,7 @@ bool GUI::event(QEvent * e) {
}
}
}
}
return QMainWindow::event(e);
}