]> git.saurik.com Git - wxWidgets.git/commitdiff
fixes for compilation with wxUSE_PALETTE=0
authorVadim Zeitlin <vadim@wxwidgets.org>
Thu, 4 Oct 2001 01:50:17 +0000 (01:50 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Thu, 4 Oct 2001 01:50:17 +0000 (01:50 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@11819 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/generic/tbarsmpl.cpp

index 42557f2885dec07199b0fc81f445fb8e3081579c..7ddf168ec678e1cadb9b4bc608ab51aba4e683e9 100644 (file)
@@ -516,10 +516,12 @@ void wxToolBarSimple::DrawTool(wxDC& dc, wxToolBarToolBase *toolBase)
 
     if ( bitmap.Ok() )
     {
 
     if ( bitmap.Ok() )
     {
+#if wxUSE_PALETTE
 #ifndef __WXGTK__
         if (bitmap.GetPalette())
             memDC.SetPalette(*bitmap.GetPalette());
 #endif
 #ifndef __WXGTK__
         if (bitmap.GetPalette())
             memDC.SetPalette(*bitmap.GetPalette());
 #endif
+#endif // wxUSE_PALETTE
 
         int ax = (int)tool->m_x,
         ay = (int)tool->m_y,
 
         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);
                     &memDC, 0, 0);
         }
         memDC.SelectObject(wxNullBitmap);
+
+#if wxUSE_PALETTE
 #ifndef __WXGTK__
         memDC.SetPalette(wxNullPalette);
 #endif
 #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() )
     }
     // No second bitmap, so draw a thick line around bitmap, or invert if mono
     else if ( tool->IsToggled() )