mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2024-10-22 10:46:04 +03:00
Fix issue with unreversible "Minimize to tray"
This commit is contained in:
parent
a26da65419
commit
a757953b76
1 changed files with 1 additions and 8 deletions
|
@ -702,13 +702,6 @@ void MainWindow::toggleVisibility(QSystemTrayIcon::ActivationReason e) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
show();
|
show();
|
||||||
if(isMinimized()) {
|
|
||||||
if(isMaximized()) {
|
|
||||||
showMaximized();
|
|
||||||
}else{
|
|
||||||
showNormal();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
raise();
|
raise();
|
||||||
activateWindow();
|
activateWindow();
|
||||||
}else{
|
}else{
|
||||||
|
@ -818,7 +811,7 @@ bool MainWindow::event(QEvent * e) {
|
||||||
// Iconify if there is no modal window
|
// Iconify if there is no modal window
|
||||||
if(!has_modal_window) {
|
if(!has_modal_window) {
|
||||||
qDebug("Minimize to Tray enabled, hiding!");
|
qDebug("Minimize to Tray enabled, hiding!");
|
||||||
e->accept();
|
e->ignore();
|
||||||
QTimer::singleShot(0, this, SLOT(hide()));
|
QTimer::singleShot(0, this, SLOT(hide()));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue