Corrected regression introduced in r2826: exit application when nothing is playing

This commit is contained in:
Arnaud Bienner 2011-02-16 23:03:00 +00:00
parent 375abfd04e
commit 0f1a1cc332
1 changed files with 7 additions and 5 deletions

View File

@ -1755,9 +1755,11 @@ bool MainWindow::winEvent(MSG* msg, long*) {
void MainWindow::Exit() {
// To shut down the application when fadeout will be finished
connect(player_->engine(), SIGNAL(FadeoutFinishedSignal()), qApp, SLOT(quit()));
player_->Stop();
hide();
tray_icon_->SetVisible(false);
if(player_->GetState() == Engine::Playing) {
player_->Stop();
hide();
tray_icon_->SetVisible(false);
} else {
qApp->quit();
}
}