Corrected an other regression introduced in r2826: exit when playing and fadeout is disable
This commit is contained in:
parent
0f1a1cc332
commit
6d8c87418a
|
@ -1753,13 +1753,15 @@ bool MainWindow::winEvent(MSG* msg, long*) {
|
|||
#endif // Q_OS_WIN32
|
||||
|
||||
void MainWindow::Exit() {
|
||||
// To shut down the application when fadeout will be finished
|
||||
connect(player_->engine(), SIGNAL(FadeoutFinishedSignal()), qApp, SLOT(quit()));
|
||||
if(player_->GetState() == Engine::Playing) {
|
||||
player_->Stop();
|
||||
hide();
|
||||
tray_icon_->SetVisible(false);
|
||||
} else {
|
||||
qApp->quit();
|
||||
if(player_->engine()->is_fadeout_enabled()) {
|
||||
// To shut down the application when fadeout will be finished
|
||||
connect(player_->engine(), SIGNAL(FadeoutFinishedSignal()), qApp, SLOT(quit()));
|
||||
if(player_->GetState() == Engine::Playing) {
|
||||
player_->Stop();
|
||||
hide();
|
||||
tray_icon_->SetVisible(false);
|
||||
return; // Don't quit the application now: wait for the fadeout finished signal
|
||||
}
|
||||
}
|
||||
qApp->quit();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue