Always eat <RETURN> in wxListBox so that no
unselection/selection can be done wihtout wxGTK sending any event. Also prevent wxGTK from sending unselect events when a wxListBox with selected items in multiple mode gets destroyed. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8644 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -222,9 +222,9 @@ gtk_listbox_key_press_callback( GtkWidget *widget, GdkEventKey *gdk_event, wxLis
|
||||
ret = listbox->GetEventHandler()->ProcessEvent( new_event );
|
||||
}
|
||||
|
||||
if ((gdk_event->keyval == GDK_Return) && listbox->HasFlag(wxLB_SINGLE) && (!ret))
|
||||
if ((gdk_event->keyval == GDK_Return) && (!ret))
|
||||
{
|
||||
// eat return in single mode
|
||||
// eat return in all modes
|
||||
ret = TRUE;
|
||||
}
|
||||
|
||||
@@ -409,6 +409,8 @@ bool wxListBox::Create( wxWindow *parent, wxWindowID id,
|
||||
|
||||
wxListBox::~wxListBox()
|
||||
{
|
||||
m_hasVMT = FALSE;
|
||||
|
||||
Clear();
|
||||
}
|
||||
|
||||
|
@@ -222,9 +222,9 @@ gtk_listbox_key_press_callback( GtkWidget *widget, GdkEventKey *gdk_event, wxLis
|
||||
ret = listbox->GetEventHandler()->ProcessEvent( new_event );
|
||||
}
|
||||
|
||||
if ((gdk_event->keyval == GDK_Return) && listbox->HasFlag(wxLB_SINGLE) && (!ret))
|
||||
if ((gdk_event->keyval == GDK_Return) && (!ret))
|
||||
{
|
||||
// eat return in single mode
|
||||
// eat return in all modes
|
||||
ret = TRUE;
|
||||
}
|
||||
|
||||
@@ -409,6 +409,8 @@ bool wxListBox::Create( wxWindow *parent, wxWindowID id,
|
||||
|
||||
wxListBox::~wxListBox()
|
||||
{
|
||||
m_hasVMT = FALSE;
|
||||
|
||||
Clear();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user