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:
@@ -542,14 +542,15 @@ void ScintillaWX::DoPaint(wxDC* dc, wxRect rect) {
|
|||||||
dc->BeginDrawing();
|
dc->BeginDrawing();
|
||||||
ClipChildren(*dc, rcPaint);
|
ClipChildren(*dc, rcPaint);
|
||||||
Paint(surfaceWindow, rcPaint);
|
Paint(surfaceWindow, rcPaint);
|
||||||
dc->EndDrawing();
|
|
||||||
|
|
||||||
delete surfaceWindow;
|
delete surfaceWindow;
|
||||||
if (paintState == paintAbandoned) {
|
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);
|
FullPaint(dc);
|
||||||
}
|
}
|
||||||
paintState = notPainting;
|
paintState = notPainting;
|
||||||
|
dc->EndDrawing();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -860,22 +861,10 @@ void ScintillaWX::DoDragLeave() {
|
|||||||
#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"));
|
stc->Refresh(false);
|
||||||
paintState = painting;
|
stc->Update();
|
||||||
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;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@@ -542,14 +542,15 @@ void ScintillaWX::DoPaint(wxDC* dc, wxRect rect) {
|
|||||||
dc->BeginDrawing();
|
dc->BeginDrawing();
|
||||||
ClipChildren(*dc, rcPaint);
|
ClipChildren(*dc, rcPaint);
|
||||||
Paint(surfaceWindow, rcPaint);
|
Paint(surfaceWindow, rcPaint);
|
||||||
dc->EndDrawing();
|
|
||||||
|
|
||||||
delete surfaceWindow;
|
delete surfaceWindow;
|
||||||
if (paintState == paintAbandoned) {
|
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);
|
FullPaint(dc);
|
||||||
}
|
}
|
||||||
paintState = notPainting;
|
paintState = notPainting;
|
||||||
|
dc->EndDrawing();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -860,22 +861,10 @@ void ScintillaWX::DoDragLeave() {
|
|||||||
#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"));
|
stc->Refresh(false);
|
||||||
paintState = painting;
|
stc->Update();
|
||||||
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;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user