Fix FullPaint to actually force the whole window to be repainted

instead of being constrained by the previous paint's update region.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27412 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2004-05-24 19:52:41 +00:00
parent de59c1618f
commit cadea444a0
2 changed files with 12 additions and 34 deletions

View File

@@ -542,14 +542,15 @@ void ScintillaWX::DoPaint(wxDC* dc, wxRect rect) {
dc->BeginDrawing();
ClipChildren(*dc, rcPaint);
Paint(surfaceWindow, rcPaint);
dc->EndDrawing();
delete surfaceWindow;
if (paintState == paintAbandoned) {
// Painting area was insufficient to cover new styling or brace highlight positions
// Painting area was insufficient to cover new styling or brace
// highlight positions
FullPaint(dc);
}
paintState = notPainting;
dc->EndDrawing();
}
@@ -860,22 +861,10 @@ void ScintillaWX::DoDragLeave() {
#endif
//----------------------------------------------------------------------
// Redraw all of text area. This paint will not be abandoned.
// Force the whole window to be repainted
void ScintillaWX::FullPaint(wxDC *dc) {
wxCHECK_RET(dc != NULL, wxT("Invalid wxDC in ScintillaWX::FillPaint"));
paintState = painting;
rcPaint = GetClientRectangle();
paintingAllText = true;
Surface* surfaceWindow = Surface::Allocate();
surfaceWindow->Init(dc, wMain.GetID());
dc->BeginDrawing();
ClipChildren(*dc, rcPaint);
Paint(surfaceWindow, rcPaint);
dc->EndDrawing();
delete surfaceWindow;
paintState = notPainting;
stc->Refresh(false);
stc->Update();
}