From: Robin Dunn Date: Sun, 30 Sep 2012 02:33:56 +0000 (+0000) Subject: Use Refresh when the initial paint was abandoned by Scintilla so it will trigger... X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/337c5edd4340d01b47a44dc46148c1c82938d626 Use Refresh when the initial paint was abandoned by Scintilla so it will trigger a repaint of the whole window. This is done for things like style changes, word wrapping or brace highlights where more than the current line is affected. Fixes #14653. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72578 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/stc/ScintillaWX.cpp b/src/stc/ScintillaWX.cpp index 153329c124..9077933669 100644 --- a/src/stc/ScintillaWX.cpp +++ b/src/stc/ScintillaWX.cpp @@ -748,8 +748,16 @@ void ScintillaWX::DoPaint(wxDC* dc, wxRect rect) { if (paintState == paintAbandoned) { // Painting area was insufficient to cover new styling or brace - // highlight positions + // highlight positions. So trigger a new paint event that will + // repaint the whole window. + stc->Refresh(false); + +#if defined(__WXOSX__) + // On Mac we also need to finish the current paint to make sure that + // everything is on the screen that needs to be there between now and + // when the next paint event arrives. FullPaintDC(dc); +#endif } paintState = notPainting; } @@ -757,8 +765,8 @@ void ScintillaWX::DoPaint(wxDC* dc, wxRect rect) { // Force the whole window to be repainted void ScintillaWX::FullPaint() { - wxClientDC dc(stc); - FullPaintDC(&dc); + stc->Refresh(false); + stc->Update(); }