Commit 4cc9d577 authored by Casian Andrei's avatar Casian Andrei Committed by Jean-Baptiste Kempf

Qt: Fix ML "Add to playlist" adding items multiple times

popupAddToPlaylist() didn't check for the column of the selected model
indexes when adding items. In the case of the tree view, a selected row
meant selected model indexes for all it's columns, so whatever was
selected was added multiple times.

Close #6408
Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent 010c77bd
......@@ -1052,6 +1052,10 @@ void PLModel::popupAddToPlaylist()
foreach( QModelIndex currentIndex, current_selection )
{
/* Don't add item multiple times when there are more columns in the model */
if( currentIndex.column() )
continue;
playlist_item_t *p_item = playlist_ItemGetById( THEPL, itemId( currentIndex ) );
if( !p_item ) continue;
......
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