Fix for indeterminate attribute specification

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69514 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart 2011-10-22 13:49:00 +00:00
parent 75936ec600
commit a2c2fdc570

View File

@ -400,6 +400,11 @@ bool wxRichTextFontPage::TransferDataFromWindow()
else
attr->SetTextEffects(attr->GetTextEffects() & ~wxTEXT_ATTR_EFFECT_STRIKETHROUGH);
}
else
{
attr->SetTextEffectFlags(attr->GetTextEffectFlags() & ~wxTEXT_ATTR_EFFECT_STRIKETHROUGH);
attr->SetTextEffects(attr->GetTextEffects() & ~wxTEXT_ATTR_EFFECT_STRIKETHROUGH);
}
if (m_capitalsCtrl->Get3StateValue() != wxCHK_UNDETERMINED)
{
@ -410,6 +415,11 @@ bool wxRichTextFontPage::TransferDataFromWindow()
else
attr->SetTextEffects(attr->GetTextEffects() & ~wxTEXT_ATTR_EFFECT_CAPITALS);
}
else
{
attr->SetTextEffectFlags(attr->GetTextEffectFlags() & ~wxTEXT_ATTR_EFFECT_CAPITALS);
attr->SetTextEffects(attr->GetTextEffects() & ~wxTEXT_ATTR_EFFECT_CAPITALS);
}
if (m_superscriptCtrl->Get3StateValue() == wxCHK_CHECKED)
{
@ -428,6 +438,7 @@ bool wxRichTextFontPage::TransferDataFromWindow()
// If they are undetermined, we don't want to include these flags in the text effects - the objects
// should retain their original style.
attr->SetTextEffectFlags(attr->GetTextEffectFlags() & ~(wxTEXT_ATTR_EFFECT_SUBSCRIPT|wxTEXT_ATTR_EFFECT_SUPERSCRIPT) );
attr->SetTextEffects(attr->GetTextEffects() & ~(wxTEXT_ATTR_EFFECT_SUBSCRIPT|wxTEXT_ATTR_EFFECT_SUPERSCRIPT) );
}
return true;