[vlc-devel] commit: Qt4 Playlist: Disable moving items into top level of Playlist/ Library Selector Panel (Jakob Leben )
git version control
git at videolan.org
Thu Aug 13 17:23:32 CEST 2009
vlc | branch: 1.0-bugfix | Jakob Leben <jakob.leben at gmail.com> | Sun Aug 2 07:30:57 2009 +0200| [f66c1d606522a025e93693a298cf38d474d204fb] | committer: Rémi Denis-Courmont
Qt4 Playlist: Disable moving items into top level of Playlist/Library Selector Panel
Signed-off-by: Rémi Denis-Courmont <remi at remlab.net>
(cherry picked from commit 0ce4275a7ebf06fa68187161eb581f8993e0060d)
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=f66c1d606522a025e93693a298cf38d474d204fb
---
.../gui/qt4/components/playlist/playlist_model.cpp | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/modules/gui/qt4/components/playlist/playlist_model.cpp b/modules/gui/qt4/components/playlist/playlist_model.cpp
index d0fbd57..add3ddc 100644
--- a/modules/gui/qt4/components/playlist/playlist_model.cpp
+++ b/modules/gui/qt4/components/playlist/playlist_model.cpp
@@ -120,8 +120,10 @@ Qt::ItemFlags PLModel::flags( const QModelIndex &index ) const
Qt::ItemFlags defaultFlags = QAbstractItemModel::flags( index );
if( index.isValid() )
return Qt::ItemIsDragEnabled | Qt::ItemIsDropEnabled | defaultFlags;
- else
- return Qt::ItemIsDropEnabled | defaultFlags;
+ else if ( rootItem->i_id != p_playlist->p_root_onelevel->i_id
+ && rootItem->i_id != p_playlist->p_root_category->i_id )
+ defaultFlags |= Qt::ItemIsDropEnabled;
+ return defaultFlags;
}
/* A list of model indexes are a playlist */
More information about the vlc-devel
mailing list