Fixed box style application.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70274 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -4014,10 +4014,22 @@ bool wxRichTextCtrl::ApplyStyle(wxRichTextStyleDefinition* def)
|
||||
// to change its style independently.
|
||||
flags |= wxRICHTEXT_SETSTYLE_PARAGRAPHS_ONLY;
|
||||
}
|
||||
else
|
||||
else if (def->IsKindOf(CLASSINFO(wxRichTextCharacterStyleDefinition)))
|
||||
attr.SetCharacterStyleName(def->GetName());
|
||||
else if (def->IsKindOf(CLASSINFO(wxRichTextBoxStyleDefinition)))
|
||||
attr.GetTextBoxAttr().SetBoxStyleName(def->GetName());
|
||||
|
||||
if (HasSelection())
|
||||
if (def->IsKindOf(CLASSINFO(wxRichTextBoxStyleDefinition)))
|
||||
{
|
||||
if (GetFocusObject() && (GetFocusObject() != & GetBuffer()))
|
||||
{
|
||||
SetStyle(GetFocusObject(), attr);
|
||||
return true;
|
||||
}
|
||||
else
|
||||
return false;
|
||||
}
|
||||
else if (HasSelection())
|
||||
return SetStyleEx(GetSelectionRange(), attr, flags);
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user