]> git.saurik.com Git - wxWidgets.git/commitdiff
fix clipping box retrieval (patch 1771199)
authorVadim Zeitlin <vadim@wxwidgets.org>
Wed, 15 Aug 2007 13:00:30 +0000 (13:00 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Wed, 15 Aug 2007 13:00:30 +0000 (13:00 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@48094 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/msw/dcclient.cpp

index 05685aa39f165e7c0e4713b120402c233ad2c099..fc8dcceefacc31f6c19fc22e2af22de4db57bb7c 100644 (file)
@@ -238,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()