Fix for incorrect programmatic formatting (default style set immediately if not using Thaw/Freeze)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66705 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
2011-01-18 13:34:10 +00:00
parent 07d4142fc4
commit 4fe83b93a5
2 changed files with 40 additions and 34 deletions

View File

@@ -9765,7 +9765,11 @@ void wxRichTextAction::UpdateAppearance(long caretPosition, bool sendUpdateEvent
m_ctrl->Refresh(false);
m_ctrl->PositionCaret();
m_ctrl->SetDefaultStyleToCursorStyle();
// This causes styles to persist when doing programmatic
// content creation except when Freeze/Thaw is used, so
// disable this and check for the consequences.
// m_ctrl->SetDefaultStyleToCursorStyle();
if (sendUpdateEvent)
wxTextCtrl::SendTextUpdatedEvent(m_ctrl);