actions: jump to playing song: enter run() even if there is no playing song
This commit is contained in:
@@ -1171,15 +1171,16 @@ void UpdateDatabase::run()
|
|||||||
|
|
||||||
bool JumpToPlayingSong::canBeRun() const
|
bool JumpToPlayingSong::canBeRun() const
|
||||||
{
|
{
|
||||||
return ((myScreen == myPlaylist && !myPlaylist->isFiltered())
|
return (myScreen == myPlaylist && !myPlaylist->isFiltered())
|
||||||
|| myScreen == myBrowser
|
|| myScreen == myBrowser
|
||||||
|| myScreen == myLibrary)
|
|| myScreen == myLibrary;
|
||||||
&& !myPlaylist->nowPlayingSong().empty();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void JumpToPlayingSong::run()
|
void JumpToPlayingSong::run()
|
||||||
{
|
{
|
||||||
auto s = myPlaylist->nowPlayingSong();
|
auto s = myPlaylist->nowPlayingSong();
|
||||||
|
if (s.empty())
|
||||||
|
return;
|
||||||
if (myScreen == myPlaylist)
|
if (myScreen == myPlaylist)
|
||||||
{
|
{
|
||||||
myPlaylist->main().highlight(s.getPosition());
|
myPlaylist->main().highlight(s.getPosition());
|
||||||
|
|||||||
Reference in New Issue
Block a user