initialize screens only if necessary
This commit is contained in:
@@ -80,6 +80,8 @@ void Playlist::Init()
|
||||
SortDialog->AddOption(std::make_pair("Sort", static_cast<MPD::Song::GetFunction>(0)));
|
||||
SortDialog->AddOption(std::make_pair("Reverse", static_cast<MPD::Song::GetFunction>(0)));
|
||||
SortDialog->AddOption(std::make_pair("Cancel", static_cast<MPD::Song::GetFunction>(0)));
|
||||
|
||||
isInitialized = 1;
|
||||
}
|
||||
|
||||
void Playlist::SwitchTo()
|
||||
@@ -87,6 +89,9 @@ void Playlist::SwitchTo()
|
||||
if (myScreen == this)
|
||||
return;
|
||||
|
||||
if (!isInitialized)
|
||||
Init();
|
||||
|
||||
itsScrollBegin = 0;
|
||||
|
||||
if (hasToBeResized)
|
||||
|
||||
Reference in New Issue
Block a user