]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/dcclient.cpp
don't recompute nonbreakable space character every time a text fragment is added...
[wxWidgets.git] / src / msw / dcclient.cpp
index 890f27dffd0b6cd3c03af64fc094abe62805f4d7..75c1c9a550515db4a5e844eacc415d1a6b8d2300 100644 (file)
 #ifndef WX_PRECOMP
     #include "wx/string.h"
     #include "wx/log.h"
+    #include "wx/window.h"
 #endif
 
-#include "wx/window.h"
-
 #include "wx/msw/private.h"
 
 // ----------------------------------------------------------------------------
@@ -239,10 +238,16 @@ wxPaintDC::wxPaintDC(wxWindow *canvas)
             ms_cache.Add(new wxPaintDCInfo(m_canvas, this));
     }
 
-    // (re)set the DC parameters.
     // Note: at this point m_hDC can be NULL under MicroWindows, when dragging.
-    if (GetHDC())
-        InitDC();
+    if (!GetHDC())
+        return;
+
+    // (re)set the DC parameters.
+    InitDC();
+
+    // the HDC can have a clipping box (which we didn't set), make sure our
+    // DoGetClippingBox() checks for it
+    m_clipping = true;
 }
 
 wxPaintDC::~wxPaintDC()