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
dc->BeginDrawing();
ClipChildren(*dc, rcPaint);
Paint(surfaceWindow, rcPaint);
dc->BeginDrawing();
ClipChildren(*dc, rcPaint);
Paint(surfaceWindow, rcPaint);
delete surfaceWindow;
if (paintState == paintAbandoned) {
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;
FullPaint(dc);
}
paintState = notPainting;
#endif
//----------------------------------------------------------------------
#endif
//----------------------------------------------------------------------
-// Redraw all of text area. This paint will not be abandoned.
+// Force the whole window to be repainted
void ScintillaWX::FullPaint(wxDC *dc) {
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();
dc->BeginDrawing();
ClipChildren(*dc, rcPaint);
Paint(surfaceWindow, rcPaint);
dc->BeginDrawing();
ClipChildren(*dc, rcPaint);
Paint(surfaceWindow, rcPaint);
delete surfaceWindow;
if (paintState == paintAbandoned) {
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;
FullPaint(dc);
}
paintState = notPainting;
#endif
//----------------------------------------------------------------------
#endif
//----------------------------------------------------------------------
-// Redraw all of text area. This paint will not be abandoned.
+// Force the whole window to be repainted
void ScintillaWX::FullPaint(wxDC *dc) {
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();