richedit: Don't force repaint while the redraw flag is off.

This commit is contained in:
Eric Pouech 2008-01-01 22:05:40 +01:00 committed by Alexandre Julliard
parent f43570cbf0
commit d5478118a1
2 changed files with 10 additions and 6 deletions

View File

@ -2660,7 +2660,8 @@ static LRESULT RichEditWndProc_common(HWND hWnd, UINT msg, WPARAM wParam,
ME_SendRequestResize(editor, TRUE);
return 0;
case WM_SETREDRAW:
editor->bRedraw = wParam;
if ((editor->bRedraw = wParam))
ME_RewrapRepaint(editor);
return 0;
case WM_SIZE:
{

View File

@ -109,7 +109,8 @@ void ME_UpdateRepaint(ME_TextEditor *editor)
{
/* Should be called whenever the contents of the control have changed */
ME_Cursor *pCursor;
if (!editor->bRedraw) return;
if (ME_WrapMarkedParagraphs(editor))
ME_UpdateScrollBar(editor);
@ -135,10 +136,12 @@ ME_RewrapRepaint(ME_TextEditor *editor)
* looks, but not content. Like resizing. */
ME_MarkAllForWrapping(editor);
ME_WrapMarkedParagraphs(editor);
ME_UpdateScrollBar(editor);
ME_Repaint(editor);
if (editor->bRedraw)
{
ME_WrapMarkedParagraphs(editor);
ME_UpdateScrollBar(editor);
ME_Repaint(editor);
}
}
int ME_twips2pointsX(ME_Context *c, int x)