<div class="gmail_quote">On Sun, Oct 25, 2009 at 1:36 PM, git version control <span dir="ltr"><<a href="mailto:git@videolan.org">git@videolan.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">

diff --git a/modules/gui/qt4/components/playlist/playlist_model.cpp b/modules/gui/qt4/components/playlist/playlist_model.cpp<br>
index a61434c..6f762bf 100644<br>
--- a/modules/gui/qt4/components/playlist/playlist_model.cpp<br>
+++ b/modules/gui/qt4/components/playlist/playlist_model.cpp<br>
@@ -803,7 +803,8 @@ void PLModel::updateChildren( playlist_item_t *p_node, PLItem *root )<br>
 void PLModel::updateTreeItem( PLItem *item )<br>
 {<br>
     if( !item ) return;<br>
-    emit dataChanged( index( item, 0 ) , index( item, columnCount( QModelIndex() ) ) );<br>
+    rebuild();<br>
+    //emit dataChanged( index( item, 0 ) , index( item, columnCount( QModelIndex() ) ) );<br>
 }<br></blockquote></div><br>Hi!<br><br>In my opinion, this is a rather crude way to fix the problem. It is a trivial fact that rebuilding the tree fixes the problem. You could just as well throw around rebuilds all over the code and any de-synchronization with core playlist will always be silently hidden. However, my work on the qt4 playlist was in large part directed towards minimizing rebuilds to enhance performance.<br>
<br>The real reason for the duplicate-items-bug must be in that the same item gets inserted twice without one of the copies being removed in between. Either a remove should happen in between the insertions, or the insertion shouldnt happen twice at all.<br>
<br>I'll take a look at the issue some time soon.<br><br>Cheers, Jakob<br>