From 366233e4009729ed9f8ccb4e8e7007bfa7bf4e03 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 21 Jul 2019 21:38:59 +0200 Subject: [PATCH] Add a TODO comment for wxVListBox refactoring Just note that it would be better to avoid duplicating the code already existing in another place in wxVListBoxComboPopup::SendComboBoxEvent(). --- src/generic/odcombo.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/generic/odcombo.cpp b/src/generic/odcombo.cpp index 1891540a1a..fd3061e414 100644 --- a/src/generic/odcombo.cpp +++ b/src/generic/odcombo.cpp @@ -233,6 +233,11 @@ void wxVListBoxComboPopup::DismissWithEvent() void wxVListBoxComboPopup::SendComboBoxEvent( int selection ) { + // TODO: wxVListBox should be refactored to inherit from wxItemContainer + // and then we would be able to just call SendSelectionChangedEvent() + // (which, itself, should be moved down to wxItemContainer from + // wxControlWithItemsBase) instead of duplicating its code. + wxCommandEvent evt(wxEVT_COMBOBOX,m_combo->GetId()); evt.SetEventObject(m_combo);