From 29dbfacee2a6bc6978d6224efea9a31a1a5a2649 Mon Sep 17 00:00:00 2001 From: Julian Smart Date: Fri, 28 Nov 2008 12:46:34 +0000 Subject: [PATCH] Fixed inability to select no superscript and no subscript in wxRichTextCtrl's formatting dialog (fixes bug #10121) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@56992 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/richtext/richtextctrl.cpp | 3 +-- src/richtext/richtextfontpage.cpp | 4 ---- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/src/richtext/richtextctrl.cpp b/src/richtext/richtextctrl.cpp index 1b321c28f1..b2b2b590c2 100644 --- a/src/richtext/richtextctrl.cpp +++ b/src/richtext/richtextctrl.cpp @@ -767,13 +767,12 @@ 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, // so subtract 1 for deleted character and add 1 for conversion to character position. if (newPos > -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 3105bddeb0..83215b5068 100644 --- a/src/richtext/richtextfontpage.cpp +++ b/src/richtext/richtextfontpage.cpp @@ -793,8 +793,6 @@ void wxRichTextFontPage::OnRichtextfontpageSuperscriptClick( wxCommandEvent& WXU { if ( m_superscriptCtrl->Get3StateValue() == wxCHK_CHECKED) m_subscriptCtrl->Set3StateValue( wxCHK_UNCHECKED ); - else - m_subscriptCtrl->Set3StateValue( wxCHK_CHECKED ); UpdatePreview(); } @@ -807,8 +805,6 @@ void wxRichTextFontPage::OnRichtextfontpageSubscriptClick( wxCommandEvent& WXUNU { if ( m_subscriptCtrl->Get3StateValue() == wxCHK_CHECKED) m_superscriptCtrl->Set3StateValue( wxCHK_UNCHECKED ); - else - m_superscriptCtrl->Set3StateValue( wxCHK_CHECKED ); UpdatePreview(); }