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:
Robert Roebling
2000-10-26 08:20:11 +00:00
parent e852f9033e
commit 470562a9af
2 changed files with 8 additions and 4 deletions

View File

@@ -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();
}

View File

@@ -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();
}