]> git.saurik.com Git - wxWidgets.git/blobdiff - src/cocoa/dcclient.mm
Avoid paint event recursion when the run loop is restarted inside the paint
[wxWidgets.git] / src / cocoa / dcclient.mm
index b5da8bd6c3ebfa8e3d7d802835c899fc409dc118..39e85e4c61e5342b33b4e83eb3230144c65836bf 100644 (file)
@@ -61,9 +61,7 @@ wxPaintDC::wxPaintDC(void)
 
 wxPaintDC::wxPaintDC( wxWindow *window )
 {
-    wxASSERT_MSG(!sm_focusedDC,"Found another wxDC with focus.  Do not use wxPaintDC outside of paint handlers!");
     wxASSERT_MSG([NSView focusView]==window->GetNSView(), "PaintDC's NSView does not have focus.  Please use wxPaintDC only as the first DC created in a paint handler");
-    sm_focusedDC=this;
     // This transform flips the graphics since wxDC uses top-left origin
     if(![window->GetNSView() isFlipped])
     {
@@ -86,7 +84,5 @@ wxPaintDC::wxPaintDC( wxWindow *window )
 
 wxPaintDC::~wxPaintDC(void)
 {
-    if(sm_focusedDC==this)
-        sm_focusedDC=NULL;
 };