Commit ff47c5ee authored by Antoine Cellerier's avatar Antoine Cellerier

Select item after deleting items from the playlist with KEY_DEL.

parent 5f162f59
...@@ -242,7 +242,21 @@ void CtrlTree::handleEvent( EvtGeneric &rEvent ) ...@@ -242,7 +242,21 @@ void CtrlTree::handleEvent( EvtGeneric &rEvent )
/* Delete the selection */ /* Delete the selection */
if( key == KEY_DELETE ) if( key == KEY_DELETE )
{ {
/* Find first non selected item before m_pLastSelected */
VarTree::Iterator it_sel = m_rTree.begin();
for( it = m_rTree.begin(); it != m_rTree.end();
it = m_rTree.getNextVisibleItem( it ) )
{
if( &*it == m_pLastSelected ) break;
if( !it->m_selected ) it_sel = it;
}
/* Delete selected stuff */
m_rTree.delSelected(); m_rTree.delSelected();
/* Select it_sel */
it_sel->m_selected = true;
m_pLastSelected = &*it_sel;
} }
else if( key == KEY_PAGEDOWN ) else if( key == KEY_PAGEDOWN )
{ {
......
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