Don't reset URL if applying character style

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73785 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart 2013-04-05 15:54:49 +00:00
parent cab16e6c94
commit 5fe7fce492

View File

@ -3318,7 +3318,17 @@ bool wxRichTextParagraphLayoutBox::SetStyle(const wxRichTextRange& range, const
wxRichTextRemoveStyle(child->GetAttributes(), style);
}
else if (resetExistingStyle)
{
// Preserve the URL as it's not really a formatting style but a property of the object
wxString url;
if (child->GetAttributes().HasURL() && !characterAttributes.HasURL())
url = child->GetAttributes().GetURL();
child->GetAttributes() = characterAttributes;
if (!url.IsEmpty())
child->GetAttributes().SetURL(url);
}
else
{
if (applyMinimal)