From 78856360554430ca726a0f3ea38e1c9154b05710 Mon Sep 17 00:00:00 2001 From: Julian Smart Date: Thu, 24 Jan 2008 22:23:08 +0000 Subject: [PATCH] Style removal fix git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@51363 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/richtext/richtextbuffer.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/richtext/richtextbuffer.cpp b/src/richtext/richtextbuffer.cpp index af4fd26110..d0a4bb801a 100644 --- a/src/richtext/richtextbuffer.cpp +++ b/src/richtext/richtextbuffer.cpp @@ -1682,7 +1682,7 @@ bool wxRichTextParagraphLayoutBox::SetStyle(const wxRichTextRange& range, const // Removes the given style from the paragraph wxRichTextRemoveStyle(newPara->GetAttributes(), style); } - if (resetExistingStyle) + else if (resetExistingStyle) newPara->GetAttributes() = wholeStyle; else { @@ -1762,7 +1762,7 @@ bool wxRichTextParagraphLayoutBox::SetStyle(const wxRichTextRange& range, const // Removes the given style from the paragraph wxRichTextRemoveStyle(child->GetAttributes(), style); } - if (resetExistingStyle) + else if (resetExistingStyle) child->GetAttributes() = characterAttributes; else {