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:
@@ -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);
|
||||
|
@@ -2391,6 +2391,7 @@ bool wxRichTextCtrl::DoSaveFile(const wxString& filename, int fileType)
|
||||
wxRichTextRange wxRichTextCtrl::AddParagraph(const wxString& text)
|
||||
{
|
||||
wxRichTextRange range = GetFocusObject()->AddParagraph(text);
|
||||
GetBuffer().Invalidate();
|
||||
LayoutContent();
|
||||
return range;
|
||||
}
|
||||
@@ -2399,6 +2400,7 @@ wxRichTextRange wxRichTextCtrl::AddParagraph(const wxString& text)
|
||||
wxRichTextRange wxRichTextCtrl::AddImage(const wxImage& image)
|
||||
{
|
||||
wxRichTextRange range = GetFocusObject()->AddImage(image);
|
||||
GetBuffer().Invalidate();
|
||||
LayoutContent();
|
||||
return range;
|
||||
}
|
||||
|
Reference in New Issue
Block a user