]> git.saurik.com Git - wxWidgets.git/commitdiff
[ 1491948 ] Fix for a minor GUI bug in wxEditableListBox.
authorWłodzimierz Skiba <abx@abx.art.pl>
Tue, 23 May 2006 19:30:03 +0000 (19:30 +0000)
committerWłodzimierz Skiba <abx@abx.art.pl>
Tue, 23 May 2006 19:30:03 +0000 (19:30 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39300 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

contrib/src/gizmos/editlbox.cpp

index 5f73e158830aedb4808a8c3ead38580a73896ed5..a9315781decef7b06fc3ed05620f75226d5620bd 100644 (file)
@@ -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);
     }
 }