From: Václav Slavík Date: Sun, 27 Jan 2002 00:47:13 +0000 (+0000) Subject: update the screen before gaining access to wxWindowDC X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/350d00642781486fcefd4bb7b27d8ef39f3276a9 update the screen before gaining access to wxWindowDC git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@13845 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/mgl/dcclient.cpp b/src/mgl/dcclient.cpp index 54ade252ff..e5b507cc92 100644 --- a/src/mgl/dcclient.cpp +++ b/src/mgl/dcclient.cpp @@ -32,6 +32,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxPaintDC, wxClientDC) wxWindowDC::wxWindowDC(wxWindow *win) : m_wnd(win) { MGLDevCtx *dc = win->GetPaintMGLDC(); + if ( dc ) { m_inPaintHandler = TRUE; @@ -42,6 +43,10 @@ wxWindowDC::wxWindowDC(wxWindow *win) : m_wnd(win) else { m_inPaintHandler = FALSE; + + // VS: we have to update here so that screen's content is up-to-date + // and blitting from wxWindowDC works as expected + win->Update(); dc = new MGLDevCtx(MGL_wmBeginPaint(win->GetHandle()));