From 8fe08e5275c1f96ff766a21c5c0d3b028cab9203 Mon Sep 17 00:00:00 2001 From: Jaakko Salli Date: Sun, 9 May 2010 10:48:37 +0000 Subject: [PATCH] Suppress SetFocus() warning in wxVListBoxComboPopup git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@64259 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/odcombo.h | 7 +++++++ src/generic/odcombo.cpp | 11 +++++++++++ 2 files changed, 18 insertions(+) diff --git a/include/wx/odcombo.h b/include/wx/odcombo.h index d5baadcc36..4411e73d1e 100644 --- a/include/wx/odcombo.h +++ b/include/wx/odcombo.h @@ -174,6 +174,13 @@ protected: // Stop partial completion (when some other event occurs) void StopPartialCompletion(); +#ifdef __WXMSW__ + // Added to work around a SetFocus() log error. Overriding virtual member + // function from the primary base class (in this case, wxVListBox) should + // be ABI compatible. + virtual void SetFocus(); +#endif + wxArrayString m_strings; wxArrayPtrVoid m_clientDatas; diff --git a/src/generic/odcombo.cpp b/src/generic/odcombo.cpp index c95b381460..8eaa0c93d2 100644 --- a/src/generic/odcombo.cpp +++ b/src/generic/odcombo.cpp @@ -94,6 +94,17 @@ wxVListBoxComboPopup::~wxVListBoxComboPopup() Clear(); } +#ifdef __WXMSW__ + +void wxVListBoxComboPopup::SetFocus() +{ + // Suppress SetFocus() warning by simply not calling it. This combo popup + // has already been designed with the assumption that SetFocus() may not + // do anything useful, so it really doesn't need to be called. +} + +#endif // __WXMSW__ + bool wxVListBoxComboPopup::LazyCreate() { // NB: There is a bug with wxVListBox that can be avoided by creating