mirror of
https://github.com/clementine-player/Clementine
synced 2025-01-05 14:28:40 +01:00
Merge pull request #4880 from Chocobozzz/master
Fix save state when the song was paused
This commit is contained in:
commit
4b332b8137
@ -422,7 +422,8 @@ MainWindow::MainWindow(Application* app, SystemTrayIcon* tray_icon, OSD* osd,
|
||||
|
||||
// Playlist view actions
|
||||
ui_->action_next_playlist->setShortcuts(
|
||||
QList<QKeySequence>() << QKeySequence::fromString("Ctrl+Tab")
|
||||
QList<QKeySequence>()
|
||||
<< QKeySequence::fromString("Ctrl+Tab")
|
||||
#ifdef Q_OS_DARWIN
|
||||
// On OS X "Ctrl+Tab" == Cmd + Tab but this shorcut
|
||||
// is already used by default for switching between
|
||||
@ -1190,13 +1191,15 @@ void MainWindow::LoadPlaybackStatus() {
|
||||
|
||||
void MainWindow::ResumePlayback() {
|
||||
qLog(Debug) << "Resuming playback";
|
||||
|
||||
if (saved_playback_state_ == Engine::Paused) {
|
||||
NewClosure(app_->player(), SIGNAL(Playing()), app_->player(),
|
||||
SLOT(PlayPause()));
|
||||
}
|
||||
|
||||
app_->player()->Play();
|
||||
|
||||
app_->player()->SeekTo(saved_playback_position_);
|
||||
|
||||
if (saved_playback_state_ == Engine::Paused) {
|
||||
app_->player()->Pause();
|
||||
}
|
||||
}
|
||||
|
||||
void MainWindow::PlayIndex(const QModelIndex& index) {
|
||||
|
Loading…
Reference in New Issue
Block a user