From: Clément Stenac Date: Sat, 11 Mar 2006 18:18:14 +0000 (+0000) Subject: Work around what looks like a ... X-Git-Tag: 0.9.0-test0~11946 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=b6e2bf32ae94db7137207cb3f8915f03ac347612;p=vlc Work around what looks like a ... ... WX bug ! (OnActivateItem not working with enter key on Win32) (Closes:#348) --- diff --git a/modules/gui/wxwidgets/dialogs/playlist.cpp b/modules/gui/wxwidgets/dialogs/playlist.cpp index c4102e8416..814de0ee84 100644 --- a/modules/gui/wxwidgets/dialogs/playlist.cpp +++ b/modules/gui/wxwidgets/dialogs/playlist.cpp @@ -1136,6 +1136,17 @@ void Playlist::OnKeyDown( wxTreeEvent& event ) /* We send a dummy event */ OnDeleteSelection( event ); } + /* Work around wxWin32 bug */ + else if( keycode == WXK_RETURN ) + { + wxArrayTreeItemIds items; + if( treectrl->GetSelections( items ) > 0 ) + { + wxTreeEvent event; + event.SetItem( items.Item( 0 ) ); + OnActivateItem( event ); + } + } else { event.Skip();