abstract shared parts of switchTo methods away

This commit is contained in:
Andrzej Rybczak
2012-09-15 22:27:50 +02:00
parent f7dba0a578
commit 14587cb4ec
46 changed files with 301 additions and 463 deletions

View File

@@ -34,6 +34,7 @@
#include "tag_editor.h"
#include "utility/comparators.h"
#include "title.h"
#include "screen_switcher.h"
using namespace std::placeholders;
@@ -116,23 +117,9 @@ void PlaylistEditor::refresh()
void PlaylistEditor::switchTo()
{
using Global::myScreen;
using Global::myLockedScreen;
if (myScreen == this)
return;
if (myLockedScreen)
updateInactiveScreen(this);
if (hasToBeResized || myLockedScreen)
resize();
if (myScreen != this && myScreen->isTabbable())
Global::myPrevScreen = myScreen;
myScreen = this;
drawHeader();
SwitchTo::execute(this);
markSongsInPlaylist(contentProxyList());
drawHeader();
refresh();
}