]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/statbmpg.cpp
Make wxOwnerDrawnComboBox::DoGetBestSize() twice as fast.
[wxWidgets.git] / src / generic / statbmpg.cpp
index 9927e10606e9d3dc73cbeff15a29bf708a0ce955..a21ef57e0bb206f5c3c8fc8cf4d1e201c242291d 100644 (file)
@@ -3,7 +3,6 @@
 // Purpose:     wxGenericStaticBitmap
 // Author:      Marcin Wojdyr, Stefan Csomor
 // Created:     2008-06-16
-// RCS-ID:      $Id$
 // Copyright:   wxWidgets developers
 // Licence:     wxWindows licence
 ///////////////////////////////////////////////////////////////////////////////
@@ -18,8 +17,6 @@
 
 #include "wx/generic/statbmpg.h"
 
-IMPLEMENT_DYNAMIC_CLASS(wxGenericStaticBitmap, wxStaticBitmapBase)
-
 bool wxGenericStaticBitmap::Create(wxWindow *parent, wxWindowID id,
                                    const wxBitmap& bitmap,
                                    const wxPoint& pos, const wxSize& size,
@@ -36,10 +33,16 @@ bool wxGenericStaticBitmap::Create(wxWindow *parent, wxWindowID id,
 void wxGenericStaticBitmap::OnPaint(wxPaintEvent& WXUNUSED(event))
 {
     wxPaintDC dc(this);
-    PrepareDC(dc);
-    if (m_bitmap.Ok())
+    if (m_bitmap.IsOk())
         dc.DrawBitmap(m_bitmap, 0, 0, true);
 }
 
+// under OSX_cocoa is a define, avoid duplicate info
+#ifndef wxGenericStaticBitmap
+
+IMPLEMENT_DYNAMIC_CLASS(wxGenericStaticBitmap, wxStaticBitmapBase)
+
+#endif
+
 #endif // wxUSE_STATBMP