]> git.saurik.com Git - wxWidgets.git/commitdiff
Fix FullPaint to actually force the whole window to be repainted
authorRobin Dunn <robin@alldunn.com>
Mon, 24 May 2004 19:52:41 +0000 (19:52 +0000)
committerRobin Dunn <robin@alldunn.com>
Mon, 24 May 2004 19:52:41 +0000 (19:52 +0000)
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

contrib/src/stc/ScintillaWX.cpp
src/stc/ScintillaWX.cpp

index 9b9addb843e4baad3dd583d6e6dd1a9153fca1bb..62ac066fb93b56683f92c7cbea8410d0002f8613 100644 (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();
 }
 
 
index 9b9addb843e4baad3dd583d6e6dd1a9153fca1bb..62ac066fb93b56683f92c7cbea8410d0002f8613 100644 (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();
 }