From baf1e4e5c37f49fcc451deca51aeca1bce12cfba Mon Sep 17 00:00:00 2001 From: Craig Drummond Date: Fri, 17 Jul 2015 23:42:50 +0100 Subject: [PATCH] Clear context when no active song --- context/contextwidget.cpp | 4 +++- gui/mainwindow.cpp | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/context/contextwidget.cpp b/context/contextwidget.cpp index 2f6f9ff9b..7f5d57cd2 100644 --- a/context/contextwidget.cpp +++ b/context/contextwidget.cpp @@ -578,7 +578,9 @@ void ContextWidget::updateImage(QImage img, bool created) if (img.isNull() && oldBackdrop.isNull()) { return; } - if (!img.isNull()) { + if (img.isNull()) { + currentImage=img; + } else { if (backdropOpacity<100) { img=TreeView::setOpacity(img, (backdropOpacity*1.0)/100.0); } diff --git a/gui/mainwindow.cpp b/gui/mainwindow.cpp index d8fc7354d..3de5fe3b4 100644 --- a/gui/mainwindow.cpp +++ b/gui/mainwindow.cpp @@ -1798,6 +1798,7 @@ void MainWindow::updateStatus(MPDStatus * const status) current=Song(); nowPlaying->update(current); CurrentCover::self()->update(current); + context->update(current); } current.id=0; trayItem->setToolTip("cantata", i18n("Cantata"), QLatin1String("")+i18n("Playback stopped")+QLatin1String(""));