From 76bcd8154c0a2ef886cda39dbe26e6f26ad2e9bd Mon Sep 17 00:00:00 2001 From: Julian Smart Date: Tue, 25 Oct 2005 10:41:38 +0000 Subject: [PATCH] Don't clear background in Refresh (to suit poor implementations of Refresh) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@36006 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/richtext/richtextbuffer.cpp | 2 +- src/richtext/richtextctrl.cpp | 44 ++++++++++++++++----------------- 2 files changed, 23 insertions(+), 23 deletions(-) diff --git a/src/richtext/richtextbuffer.cpp b/src/richtext/richtextbuffer.cpp index 217156ad87..3fb3820859 100644 --- a/src/richtext/richtextbuffer.cpp +++ b/src/richtext/richtextbuffer.cpp @@ -4115,7 +4115,7 @@ void wxRichTextAction::UpdateAppearance(long caretPosition, bool sendUpdateEvent { m_ctrl->LayoutContent(); m_ctrl->PositionCaret(); - m_ctrl->Refresh(); + m_ctrl->Refresh(false); if (sendUpdateEvent) m_ctrl->SendUpdateEvent(); diff --git a/src/richtext/richtextctrl.cpp b/src/richtext/richtextctrl.cpp index 893ddfee78..80585278bc 100644 --- a/src/richtext/richtextctrl.cpp +++ b/src/richtext/richtextctrl.cpp @@ -194,7 +194,7 @@ void wxRichTextCtrl::Thaw(bool refresh) if (m_freezeCount == 0 && refresh) { SetupScrollbars(); - Refresh(); + Refresh(false); } } @@ -210,7 +210,7 @@ void wxRichTextCtrl::Clear() if (m_freezeCount == 0) { SetupScrollbars(); - Refresh(); + Refresh(false); } SendUpdateEvent(); } @@ -268,7 +268,7 @@ void wxRichTextCtrl::OnSetFocus(wxFocusEvent& WXUNUSED(event)) PositionCaret(); if (!IsFrozen()) - Refresh(); + Refresh(false); } void wxRichTextCtrl::OnKillFocus(wxFocusEvent& WXUNUSED(event)) @@ -276,7 +276,7 @@ void wxRichTextCtrl::OnKillFocus(wxFocusEvent& WXUNUSED(event)) SetCaret(NULL); if (!IsFrozen()) - Refresh(); + Refresh(false); } /// Left-click @@ -389,7 +389,7 @@ void wxRichTextCtrl::OnMoveMouse(wxMouseEvent& event) SetDefaultStyleToCursorStyle(); if (extendSel) - Refresh(); + Refresh(false); } } } @@ -939,7 +939,7 @@ bool wxRichTextCtrl::MoveRight(int noPositions, int flags) SetDefaultStyleToCursorStyle(); if (extendSel) - Refresh(); + Refresh(false); return true; } else @@ -968,7 +968,7 @@ bool wxRichTextCtrl::MoveLeft(int noPositions, int flags) SetDefaultStyleToCursorStyle(); if (extendSel) - Refresh(); + Refresh(false); return true; } else @@ -1059,7 +1059,7 @@ bool wxRichTextCtrl::MoveDown(int noLines, int flags) SetDefaultStyleToCursorStyle(); if (extendSel) - Refresh(); + Refresh(false); return true; } else @@ -1082,7 +1082,7 @@ bool wxRichTextCtrl::MoveToParagraphEnd(int flags) SetDefaultStyleToCursorStyle(); if (extendSel) - Refresh(); + Refresh(false); return true; } @@ -1105,7 +1105,7 @@ bool wxRichTextCtrl::MoveToParagraphStart(int flags) SetDefaultStyleToCursorStyle(); if (extendSel) - Refresh(); + Refresh(false); return true; } @@ -1130,7 +1130,7 @@ bool wxRichTextCtrl::MoveToLineEnd(int flags) SetDefaultStyleToCursorStyle(); if (extendSel) - Refresh(); + Refresh(false); return true; } @@ -1157,7 +1157,7 @@ bool wxRichTextCtrl::MoveToLineStart(int flags) SetDefaultStyleToCursorStyle(); if (extendSel) - Refresh(); + Refresh(false); return true; } @@ -1178,7 +1178,7 @@ bool wxRichTextCtrl::MoveHome(int flags) SetDefaultStyleToCursorStyle(); if (extendSel) - Refresh(); + Refresh(false); return true; } else @@ -1201,7 +1201,7 @@ bool wxRichTextCtrl::MoveEnd(int flags) SetDefaultStyleToCursorStyle(); if (extendSel) - Refresh(); + Refresh(false); return true; } else @@ -1242,7 +1242,7 @@ bool wxRichTextCtrl::PageDown(int noPages, int flags) SetDefaultStyleToCursorStyle(); if (extendSel) - Refresh(); + Refresh(false); return true; } } @@ -1341,7 +1341,7 @@ bool wxRichTextCtrl::WordLeft(int WXUNUSED(n), int flags) SetDefaultStyleToCursorStyle(); if (extendSel) - Refresh(); + Refresh(false); return true; } @@ -1365,7 +1365,7 @@ bool wxRichTextCtrl::WordRight(int WXUNUSED(n), int flags) SetDefaultStyleToCursorStyle(); if (extendSel) - Refresh(); + Refresh(false); return true; } @@ -1403,7 +1403,7 @@ void wxRichTextCtrl::OnIdle(wxIdleEvent& event) m_fullLayoutTime = 0; GetBuffer().Invalidate(wxRICHTEXT_ALL); ShowPosition(m_fullLayoutSavedPosition); - Refresh(); + Refresh(false); } event.Skip(); } @@ -1500,7 +1500,7 @@ bool wxRichTextCtrl::LoadFile(const wxString& filename, int type) LayoutContent(); PositionCaret(); SetupScrollbars(true); - Refresh(); + Refresh(false); SendUpdateEvent(); if (success) @@ -1764,7 +1764,7 @@ void wxRichTextCtrl::Cut() DeleteSelectedContent(); LayoutContent(); - Refresh(); + Refresh(false); } } @@ -1887,7 +1887,7 @@ void wxRichTextCtrl::DoSetSelection(long from, long to, bool WXUNUSED(scrollCare { m_selectionAnchor = from; m_selectionRange.SetRange(from, to); - Refresh(); + Refresh(false); PositionCaret(); } @@ -1917,7 +1917,7 @@ void wxRichTextCtrl::Remove(long from, long to) LayoutContent(); if (!IsFrozen()) - Refresh(); + Refresh(false); } bool wxRichTextCtrl::IsModified() const -- 2.45.2