}
else
{
- attr->SetTextEffectFlags(attr->GetTextEffectFlags() | wxTEXT_ATTR_EFFECT_SUBSCRIPT | wxTEXT_ATTR_EFFECT_SUPERSCRIPT );
- attr->SetTextEffects(attr->GetTextEffects() & ~( wxTEXT_ATTR_EFFECT_SUPERSCRIPT | wxTEXT_ATTR_EFFECT_SUBSCRIPT));
+ // 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) );
}
return true;
}
else
{
- m_superscriptCtrl->Set3StateValue(wxCHK_UNCHECKED);
- m_subscriptCtrl->Set3StateValue(wxCHK_UNCHECKED);
+ m_superscriptCtrl->Set3StateValue(wxCHK_UNDETERMINED);
+ m_subscriptCtrl->Set3StateValue(wxCHK_UNDETERMINED);
}
}
else
{
m_strikethroughCtrl->Set3StateValue(wxCHK_UNDETERMINED);
m_capitalsCtrl->Set3StateValue(wxCHK_UNDETERMINED);
- m_superscriptCtrl->Set3StateValue(wxCHK_UNCHECKED);
- m_subscriptCtrl->Set3StateValue(wxCHK_UNCHECKED);
+ m_superscriptCtrl->Set3StateValue(wxCHK_UNDETERMINED);
+ m_subscriptCtrl->Set3StateValue(wxCHK_UNDETERMINED);
}
UpdatePreview();
void wxRichTextFontPage::OnRichtextfontpageSuperscriptClick( wxCommandEvent& WXUNUSED(event) )
{
- if ( m_superscriptCtrl->Get3StateValue() == wxCHK_CHECKED && m_subscriptCtrl->Get3StateValue() == wxCHK_CHECKED )
+ if ( m_superscriptCtrl->Get3StateValue() == wxCHK_CHECKED)
m_subscriptCtrl->Set3StateValue( wxCHK_UNCHECKED );
+
UpdatePreview();
}
void wxRichTextFontPage::OnRichtextfontpageSubscriptClick( wxCommandEvent& WXUNUSED(event) )
{
- if ( m_superscriptCtrl->Get3StateValue() == wxCHK_CHECKED && m_subscriptCtrl->Get3StateValue() == wxCHK_CHECKED )
+ if ( m_subscriptCtrl->Get3StateValue() == wxCHK_CHECKED)
m_superscriptCtrl->Set3StateValue( wxCHK_UNCHECKED );
+
UpdatePreview();
}