diff --git a/docs/changes.txt b/docs/changes.txt index 93f1a4212e..7453a343d7 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -105,6 +105,8 @@ All (GUI): - Fixed a problem with HTML list generation for wxRichTextCtrl. - wxRichTextCtrl no longer deletes a character when content is selected before pressing Delete. +- Fixed inability to select no superscript and no subscript in wxRichTextCtrl's + formatting dialog. - Fixed wxHTML's pagebreaks computation in tables (D.J.Stauffer). - Fixed wxHtmlWindow::SelectionToText() to correctly insert newlines after single-cell paragraphs. diff --git a/src/richtext/richtextctrl.cpp b/src/richtext/richtextctrl.cpp index aad762ab6c..4a5736542d 100644 --- a/src/richtext/richtextctrl.cpp +++ b/src/richtext/richtextctrl.cpp @@ -913,12 +913,11 @@ void wxRichTextCtrl::OnChar(wxKeyEvent& event) long newPos = m_caretPosition; - DeleteSelectedContent(& newPos); + bool processed = DeleteSelectedContent(& newPos); // Submit range in character positions, which are greater than caret positions, if (newPos < GetBuffer().GetRange().GetEnd()+1) { - bool processed = false; if (event.CmdDown()) { long pos = wxRichTextCtrl::FindNextWordPosition(1); diff --git a/src/richtext/richtextfontpage.cpp b/src/richtext/richtextfontpage.cpp index 59fe601306..99a79662c6 100644 --- a/src/richtext/richtextfontpage.cpp +++ b/src/richtext/richtextfontpage.cpp @@ -808,8 +808,6 @@ void wxRichTextFontPage::OnRichtextfontpageSuperscriptClick( wxCommandEvent& WXU { if ( m_superscriptCtrl->Get3StateValue() == wxCHK_CHECKED) m_subscriptCtrl->Set3StateValue( wxCHK_UNCHECKED ); - else - m_subscriptCtrl->Set3StateValue( wxCHK_CHECKED ); UpdatePreview(); } @@ -822,8 +820,6 @@ void wxRichTextFontPage::OnRichtextfontpageSubscriptClick( wxCommandEvent& WXUNU { if ( m_subscriptCtrl->Get3StateValue() == wxCHK_CHECKED) m_superscriptCtrl->Set3StateValue( wxCHK_UNCHECKED ); - else - m_superscriptCtrl->Set3StateValue( wxCHK_CHECKED ); UpdatePreview(); }