check properly in MouseButtonPressed if switching columns is allowed

This commit is contained in:
Andrzej Rybczak
2012-09-13 17:46:35 +02:00
parent 382e4c0177
commit 31b06470d1
3 changed files with 93 additions and 25 deletions

View File

@@ -327,7 +327,12 @@ void PlaylistEditor::MouseButtonPressed(MEVENT me)
if (!Playlists->empty() && Playlists->hasCoords(me.x, me.y))
{
if (w != Playlists)
PrevColumn();
{
if (isPrevColumnAvailable())
PrevColumn();
else
return;
}
if (size_t(me.y) < Playlists->size() && (me.bstate & (BUTTON1_PRESSED | BUTTON3_PRESSED)))
{
Playlists->Goto(me.y);
@@ -346,7 +351,12 @@ void PlaylistEditor::MouseButtonPressed(MEVENT me)
else if (!Content->empty() && Content->hasCoords(me.x, me.y))
{
if (w != Content)
NextColumn();
{
if (isNextColumnAvailable())
NextColumn();
else
return;
}
if (size_t(me.y) < Content->size() && (me.bstate & (BUTTON1_PRESSED | BUTTON3_PRESSED)))
{
Content->Goto(me.y);