Added an optimisation when the control is frozen

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@75693 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
2014-01-23 21:02:16 +00:00
parent 209a3bad20
commit 25684990fa

View File

@@ -3030,8 +3030,11 @@ void wxRichTextCtrl::DoWriteText(const wxString& value, int flags)
wxString valueUnix = wxTextFile::Translate(value, wxTextFileType_Unix);
GetFocusObject()->InsertTextWithUndo(& GetBuffer(), m_caretPosition+1, valueUnix, this, wxRICHTEXT_INSERT_WITH_PREVIOUS_PARAGRAPH_STYLE);
wxRichTextDrawingContext context(& GetBuffer());
GetBuffer().Defragment(context);
if (!IsFrozen())
{
wxRichTextDrawingContext context(& GetBuffer());
GetBuffer().Defragment(context);
}
if ( flags & SetValue_SendEvent )
wxTextCtrl::SendTextUpdatedEvent(this);