From ea406d2f3acf728f7b7a2258e6e392605b3af371 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Tue, 12 May 2015 17:04:59 +0200 Subject: [PATCH] Don't make wxToolBarToolBase::Set{Normal,Disabled}Bitmap() virtual. There is no need for this, these methods are not supposed to be overridden as they are only ever called by wxToolBar itself and making them virtual just confused things. See #16985. --- include/wx/tbarbase.h | 4 ++-- src/osx/carbon/toolbar.cpp | 6 ------ 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/include/wx/tbarbase.h b/include/wx/tbarbase.h index 71bddad2a5..145803ec4b 100644 --- a/include/wx/tbarbase.h +++ b/include/wx/tbarbase.h @@ -177,8 +177,8 @@ public: void Toggle() { Toggle(!IsToggled()); } - virtual void SetNormalBitmap(const wxBitmap& bmp) { m_bmpNormal = bmp; } - virtual void SetDisabledBitmap(const wxBitmap& bmp) { m_bmpDisabled = bmp; } + void SetNormalBitmap(const wxBitmap& bmp) { m_bmpNormal = bmp; } + void SetDisabledBitmap(const wxBitmap& bmp) { m_bmpDisabled = bmp; } virtual void SetLabel(const wxString& label) { m_label = label; } diff --git a/src/osx/carbon/toolbar.cpp b/src/osx/carbon/toolbar.cpp index 8533823fc2..a7372ff51d 100644 --- a/src/osx/carbon/toolbar.cpp +++ b/src/osx/carbon/toolbar.cpp @@ -195,12 +195,6 @@ public: return true; } - virtual void SetNormalBitmap(const wxBitmap& bmp) - { - wxToolBarToolBase::SetNormalBitmap(bmp); - UpdateToggleImage(CanBeToggled() && IsToggled()); - } - virtual void SetLabel(const wxString& label) { wxToolBarToolBase::SetLabel(label);