Commit 41f42043 authored by Erwan Tulou's avatar Erwan Tulou

skins2: fix playlist arrows and enter no longer functioning

This patch fixes a regression brought by 88ba4526d03285a10e9abd59b9053c9d6927661
 that prevented arrows from being functional.
parent 830905f6
......@@ -283,6 +283,10 @@ void CtrlTree::handleEvent( EvtGeneric &rEvent )
/* Select it_sel */
it_sel->m_selected = true;
m_pLastSelected = &*it_sel;
// Redraw the control
makeImage();
notifyLayout();
}
else if( key == KEY_PAGEDOWN )
{
......@@ -307,7 +311,6 @@ void CtrlTree::handleEvent( EvtGeneric &rEvent )
ensureVisible( it );
makeImage();
notifyLayout();
return;
}
}
else if (key == KEY_PAGEUP )
......@@ -328,25 +331,22 @@ void CtrlTree::handleEvent( EvtGeneric &rEvent )
ensureVisible( it );
makeImage();
notifyLayout();
return;
}
else
else if ( key == KEY_UP ||
key == KEY_DOWN ||
key == KEY_LEFT ||
key == KEY_RIGHT ||
key == KEY_ENTER ||
key == ' ' )
{
// other keys to be forwarded to vlc core
EvtKey& rEvtKey = (EvtKey&)rEvent;
var_SetInteger( getIntf()->p_libvlc, "key-pressed",
rEvtKey.getModKey() );
return;
}
for( it = m_flat ? m_rTree.firstLeaf() : m_rTree.begin();
it != m_rTree.end();
it = m_flat ? m_rTree.getNextLeaf( it )
: m_rTree.getNextVisibleItem( it ) )
{
VarTree::Iterator next = m_flat ? m_rTree.getNextLeaf( it )
: m_rTree.getNextVisibleItem( it );
VarTree::Iterator next = m_flat ?
m_rTree.getNextLeaf( it ) :
m_rTree.getNextVisibleItem( it );
if( key == KEY_UP )
{
// Scroll up one item
......@@ -448,11 +448,19 @@ void CtrlTree::handleEvent( EvtGeneric &rEvent )
}
if( needShow )
ensureVisible( toShow );
// Redraw the control
makeImage();
notifyLayout();
}
else
{
// other keys to be forwarded to vlc core
EvtKey& rEvtKey = (EvtKey&)rEvent;
var_SetInteger( getIntf()->p_libvlc, "key-pressed",
rEvtKey.getModKey() );
}
}
else if( rEvent.getAsString().find( "mouse:left" ) != string::npos )
{
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment