X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/7aa5864467bf0bb220fdc447876f13f178ae8f35..594f0f5bf1355fb8d58f403d3ebacc1c1767c429:/src/generic/tbarsmpl.cpp diff --git a/src/generic/tbarsmpl.cpp b/src/generic/tbarsmpl.cpp index 42557f2885..7ddf168ec6 100644 --- a/src/generic/tbarsmpl.cpp +++ b/src/generic/tbarsmpl.cpp @@ -516,10 +516,12 @@ void wxToolBarSimple::DrawTool(wxDC& dc, wxToolBarToolBase *toolBase) if ( bitmap.Ok() ) { +#if wxUSE_PALETTE #ifndef __WXGTK__ if (bitmap.GetPalette()) memDC.SetPalette(*bitmap.GetPalette()); #endif +#endif // wxUSE_PALETTE int ax = (int)tool->m_x, ay = (int)tool->m_y, @@ -552,9 +554,12 @@ void wxToolBarSimple::DrawTool(wxDC& dc, wxToolBarToolBase *toolBase) &memDC, 0, 0); } memDC.SelectObject(wxNullBitmap); + +#if wxUSE_PALETTE #ifndef __WXGTK__ memDC.SetPalette(wxNullPalette); #endif +#endif // wxUSE_PALETTE } // No second bitmap, so draw a thick line around bitmap, or invert if mono else if ( tool->IsToggled() )