From bec3b0ddefb84e9f487403a275d2f4592dd5fecc Mon Sep 17 00:00:00 2001 From: =?utf8?q?W=C5=82odzimierz=20Skiba?= Date: Tue, 23 May 2006 19:30:03 +0000 Subject: [PATCH] [ 1491948 ] Fix for a minor GUI bug in wxEditableListBox. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39300 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- contrib/src/gizmos/editlbox.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/contrib/src/gizmos/editlbox.cpp b/contrib/src/gizmos/editlbox.cpp index 5f73e15883..a9315781de 100644 --- a/contrib/src/gizmos/editlbox.cpp +++ b/contrib/src/gizmos/editlbox.cpp @@ -224,6 +224,12 @@ void wxEditableListBox::OnEndLabelEdit(wxListEvent& event) // add new empty line here so that adding one more line is still // possible: m_listCtrl->InsertItem(m_listCtrl->GetItemCount(), wxEmptyString); + + // Simulate a wxEVT_COMMAND_LIST_ITEM_SELECTED event for the new item, + // so that the buttons are enabled/disabled properly + wxListEvent selectionEvent(wxEVT_COMMAND_LIST_ITEM_SELECTED, m_listCtrl->GetId()); + selectionEvent.m_itemIndex = event.GetIndex(); + m_listCtrl->GetEventHandler()->ProcessEvent(selectionEvent); } } -- 2.45.2