[vlc-devel] commit: qt4: little tweaking on PLModel::flags on playlist-locking ( Ilkka Ollakka )
git version control
git at videolan.org
Tue Aug 18 15:17:52 CEST 2009
vlc | branch: master | Ilkka Ollakka <ileoo at videolan.org> | Tue Aug 18 13:30:10 2009 +0300| [50ad59bb71a91f730ca048920cc5fb142ec122f2] | committer: Ilkka Ollakka
qt4: little tweaking on PLModel::flags on playlist-locking
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=50ad59bb71a91f730ca048920cc5fb142ec122f2
---
.../gui/qt4/components/playlist/playlist_model.cpp | 12 +++++++-----
1 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/modules/gui/qt4/components/playlist/playlist_model.cpp b/modules/gui/qt4/components/playlist/playlist_model.cpp
index 577fae6..442e753 100644
--- a/modules/gui/qt4/components/playlist/playlist_model.cpp
+++ b/modules/gui/qt4/components/playlist/playlist_model.cpp
@@ -156,16 +156,18 @@ Qt::ItemFlags PLModel::flags( const QModelIndex &index ) const
|| item->p_input == ml_input)
flags |= Qt::ItemIsDropEnabled;
}
- else
+ else if( rootItem->p_input == pl_input ||
+ rootItem->p_input == ml_input )
{
PL_LOCK;
playlist_item_t *plItem =
playlist_ItemGetById( p_playlist, item->i_id );
- if ( plItem && ( plItem->i_children > -1 ) &&
- ( rootItem->p_input == pl_input ||
- rootItem->p_input == ml_input ) )
- flags |= Qt::ItemIsDropEnabled;
+
+ if ( plItem && ( plItem->i_children > -1 ) )
+ flags |= Qt::ItemIsDropEnabled;
+
PL_UNLOCK;
+
flags |= Qt::ItemIsDragEnabled;
}
More information about the vlc-devel
mailing list