diff --git a/common/widgets/layer_box_selector.cpp b/common/widgets/layer_box_selector.cpp index cec018b0df..5a21495f5a 100644 --- a/common/widgets/layer_box_selector.cpp +++ b/common/widgets/layer_box_selector.cpp @@ -168,9 +168,9 @@ void LAYER_BOX_SELECTOR::onKeyDown( wxKeyEvent& aEvent ) } +#ifdef __WXMAC__ void LAYER_BOX_SELECTOR::OnDrawBackground( wxDC& dc, const wxRect& rect, int item, int flags) const { -#ifndef __WXMSW__ if( ( flags & wxODCB_PAINTING_CONTROL ) && !IsEnabled() ) { wxColour fgCol = wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ); @@ -188,7 +188,7 @@ void LAYER_BOX_SELECTOR::OnDrawBackground( wxDC& dc, const wxRect& rect, int ite dc.SetClippingRegion( rect ); return; } -#endif wxBitmapComboBox::OnDrawBackground( dc, rect, item, flags ); } +#endif diff --git a/include/widgets/layer_box_selector.h b/include/widgets/layer_box_selector.h index 33e17f7453..02054e580b 100644 --- a/include/widgets/layer_box_selector.h +++ b/include/widgets/layer_box_selector.h @@ -92,7 +92,9 @@ public: private: void onKeyDown( wxKeyEvent& aEvent ); +#ifdef __WXMAC__ void OnDrawBackground( wxDC& dc, const wxRect& rect, int item, int flags) const override; +#endif }; #endif // LAYER_BOX_SELECTOR_H