Avoid invisible text in style list

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75116 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
2013-11-01 18:07:26 +00:00
parent 604d493cd6
commit d1c8e1290b

View File

@@ -842,7 +842,7 @@ wxString wxRichTextStyleListBox::CreateHTML(wxRichTextStyleDefinition* def) cons
if (!attr.GetFontFaceName().IsEmpty())
str << wxT(" face=\"") << attr.GetFontFaceName() << wxT("\"");
if (attr.GetTextColour().IsOk())
if (attr.GetTextColour().IsOk() && attr.GetTextColour() != attr.GetBackgroundColour() && !(!attr.HasBackgroundColour() && attr.GetTextColour() == *wxWHITE))
str << wxT(" color=\"#") << ColourToHexString(attr.GetTextColour()) << wxT("\"");
if (attr.GetBackgroundColour().Ok())