From: Jaakko Salli Date: Sun, 9 May 2010 10:29:48 +0000 (+0000) Subject: Supress SetFocus() warning in wxVListBoxComboPopup X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/c0c05e79b20d6ca372ece6ac5995b0e3db18a29b?ds=inline Supress SetFocus() warning in wxVListBoxComboPopup git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64258 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/include/wx/odcombo.h b/include/wx/odcombo.h index 614663e72c..9a6b7bf394 100644 --- a/include/wx/odcombo.h +++ b/include/wx/odcombo.h @@ -80,6 +80,7 @@ public: // required virtuals virtual void Init(); virtual bool Create(wxWindow* parent); + virtual void SetFocus(); virtual wxWindow *GetControl() { return this; } virtual void SetStringValue( const wxString& value ); virtual wxString GetStringValue() const; diff --git a/src/generic/odcombo.cpp b/src/generic/odcombo.cpp index 5176871ddd..47b567d1ef 100644 --- a/src/generic/odcombo.cpp +++ b/src/generic/odcombo.cpp @@ -96,6 +96,18 @@ wxVListBoxComboPopup::~wxVListBoxComboPopup() Clear(); } +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. +#ifdef __WXMSW__ + // +#else + wxVListBox::SetFocus(); +#endif +} + bool wxVListBoxComboPopup::LazyCreate() { // NB: There is a bug with wxVListBox that can be avoided by creating