Select item after deleting items from the playlist with KEY_DEL.

This commit is contained in:
Antoine Cellerier 2006-03-05 15:47:17 +00:00
parent 5f162f59b9
commit ff47c5ee4f
1 changed files with 14 additions and 0 deletions

View File

@ -242,7 +242,21 @@ void CtrlTree::handleEvent( EvtGeneric &rEvent )
/* Delete the selection */
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();
/* Select it_sel */
it_sel->m_selected = true;
m_pLastSelected = &*it_sel;
}
else if( key == KEY_PAGEDOWN )
{