initialize screens only if necessary

This commit is contained in:
Andrzej Rybczak
2009-06-26 18:48:00 +02:00
parent 1147795fc6
commit 450bf1b636
26 changed files with 99 additions and 41 deletions

View File

@@ -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)