]> git.saurik.com Git - wxWidgets.git/blobdiff - samples/erase/erase.cpp
Fix warnings about implicit float or double to int conversions in wxMSW.
[wxWidgets.git] / samples / erase / erase.cpp
index 307f639df9cf1a425551c1cc727a2a3798b71a0b..37fc81bb8870ddcdf4a444b02bde67e89b951343 100644 (file)
@@ -362,6 +362,8 @@ MyCanvas::MyCanvas(wxFrame *parent)
 
 void MyCanvas::DoPaint(wxDC& dc)
 {
+    PrepareDC(dc);
+
     if ( m_eraseBgInPaint )
     {
         dc.SetBackground(*wxLIGHT_GREY);
@@ -391,15 +393,11 @@ void MyCanvas::OnPaint( wxPaintEvent &WXUNUSED(event) )
     if ( m_useBuffer )
     {
         wxAutoBufferedPaintDC dc(this);
-        PrepareDC(dc);
-
         DoPaint(dc);
     }
     else
     {
         wxPaintDC dc(this);
-        PrepareDC(dc);
-
         DoPaint(dc);
     }
 }