[vlc-devel] Playlist item expansion causes wxWidgets assertion failure
Alexander Gall
gall at switch.ch
Thu Mar 2 16:21:18 CET 2006
modules/gui/wxwidgets/dialogs/playlist.cpp:Playlist::UpdateTreeItem()
walks up the tree and expands all items. However, the playlist has
the wxTR_HIDE_ROOT flag set. Calling Expand() on the root triggers an
assertion failure in wxWidgets ("Can't expand hidden root"). I'm
using a recent snapshot of wxWidgets 2.6.3-rc, but this patch should
be ok in any case.
--
Alex
diff -Naur vlc-0.8.5-20060302.orig/modules/gui/wxwidgets/dialogs/playlist.cpp vlc-0.8.5-20060302/modules/gui/wxwidgets/dialogs/pla
ylist.cpp
--- vlc-0.8.5-20060302.orig/modules/gui/wxwidgets/dialogs/playlist.cpp 2006-03-02 15:33:55.142144000 +0100
+++ vlc-0.8.5-20060302/modules/gui/wxwidgets/dialogs/playlist.cpp 2006-03-02 15:41:02.857633000 +0100
@@ -530,7 +530,9 @@
while( treectrl->GetItemParent( item ).IsOk() )
{
item = treectrl->GetItemParent( item );
- treectrl->Expand( item );
+ if (!(item == treectrl->GetRootItem() &&
+ treectrl->HasFlag(wxTR_HIDE_ROOT)))
+ treectrl->Expand( item );
}
}
else
--
This is the vlc-devel mailing-list, see http://www.videolan.org/vlc/
To unsubscribe, please read http://developers.videolan.org/lists.html
More information about the vlc-devel
mailing list