Commit 490745a0 authored by Erwan Tulou's avatar Erwan Tulou

skins2: drag&drop (small tweak)

Rather than automatically expanding folders when hoving over them, use this
information (folder expanded or not) to either insert the dropped item as its
next sibling in the parent folder or as its first child in this folder respectively.
parent a9beb407
...@@ -504,8 +504,6 @@ void CtrlTree::handleEvent( EvtGeneric &rEvent ) ...@@ -504,8 +504,6 @@ void CtrlTree::handleEvent( EvtGeneric &rEvent )
Iterator it = findItemAtPos( yPos ); Iterator it = findItemAtPos( yPos );
if( it != m_itOver ) if( it != m_itOver )
{ {
if( it != m_rTree.end() )
it->setExpanded( true );
m_itOver = it; m_itOver = it;
needRefresh = true; needRefresh = true;
} }
......
...@@ -290,7 +290,7 @@ void Playtree::insertItems( VarTree& elem, const list<string>& files, bool start ...@@ -290,7 +290,7 @@ void Playtree::insertItems( VarTree& elem, const list<string>& files, bool start
p_node = m_pPlaylist->p_ml_category; p_node = m_pPlaylist->p_ml_category;
i_pos = 0; i_pos = 0;
} }
else if( p_elem->size() ) else if( p_elem->size() && p_elem->isExpanded() )
{ {
p_node = playlist_ItemGetById( m_pPlaylist, p_elem->getId() ); p_node = playlist_ItemGetById( m_pPlaylist, p_elem->getId() );
i_pos = 0; i_pos = 0;
......
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