ctrl_tree.cpp: fix selection bug (when pressing KEY_DOWN if the selected item was the last visible tree item)

playtree.hpp: cosmetics
This commit is contained in:
Antoine Cellerier 2006-03-05 15:33:02 +00:00
parent 5983a04266
commit 5397b8f3ea
2 changed files with 8 additions and 1 deletions

View File

@ -329,6 +329,13 @@ void CtrlTree::handleEvent( EvtGeneric &rEvent )
{
previousWasSelected = ( &*it == m_pLastSelected );
}
// Fix last tree item selection
if( m_rTree.getNextVisibleItem( it ) == m_rTree.end()
&& &*it == m_pLastSelected )
{
(*it).m_selected = true;
}
}
else if( key == KEY_RIGHT )
{

View File

@ -45,7 +45,7 @@ class Playtree: public VarTree
/// Function called to notify playlist item update
void onUpdateItem( int id );
/// Function called to notify playlist item append
/// Function called to notify playlist item append
void onAppend( playlist_add_t * );
/// Function called to notify playlist item delete