From: Vadim Zeitlin Date: Tue, 15 Feb 2005 12:16:33 +0000 (+0000) Subject: (blind) fix for virtual function hiding warning X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/d2fde247b6f22a664e0cad94c04cfcb26dbc86c1?hp=853fab02762feb41225db75714570c00da847f13 (blind) fix for virtual function hiding warning git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@32072 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/include/wx/combobox.h b/include/wx/combobox.h index 578801b858..051737b646 100644 --- a/include/wx/combobox.h +++ b/include/wx/combobox.h @@ -59,6 +59,10 @@ public: virtual bool CanUndo() const = 0; virtual bool CanRedo() const = 0; + + // redeclare inherited SetSelection() overload here as well to avoid + // virtual function hiding + virtual void SetSelection(int n) = 0; }; // ---------------------------------------------------------------------------- diff --git a/src/univ/combobox.cpp b/src/univ/combobox.cpp index 9d771ab73f..e261d32fde 100644 --- a/src/univ/combobox.cpp +++ b/src/univ/combobox.cpp @@ -122,13 +122,15 @@ public: virtual ~wxComboListBox(); // implement wxComboPopup methods - virtual bool SetSelection(const wxString& value); - virtual void SetSelection(int n, bool select) - { wxListBox::SetSelection( n, select); }; + virtual bool SetSelection(const wxString& s); virtual wxControl *GetControl() { return this; } virtual void OnShow(); virtual wxCoord GetBestWidth() const; + // fix virtual function hiding + virtual void SetSelection(int n) { DoSetSelection(n, true); } + void SetSelection(int n, bool select) { DoSetSelection(n, select); } + protected: // we shouldn't return height too big from here virtual wxSize DoGetBestClientSize() const;