From 7e3a37bedf5a76c7e09c4c9aaae9483c1744b133 Mon Sep 17 00:00:00 2001 From: Julian Smart Date: Mon, 5 Mar 2007 16:08:15 +0000 Subject: [PATCH] Drawing correction git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@44613 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/richtext/richtextbuffer.cpp | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/src/richtext/richtextbuffer.cpp b/src/richtext/richtextbuffer.cpp index ec6f0c6f47..780445870b 100644 --- a/src/richtext/richtextbuffer.cpp +++ b/src/richtext/richtextbuffer.cpp @@ -4329,20 +4329,21 @@ bool wxRichTextPlainText::DrawTabbedString(wxDC& dc, const wxTextAttrEx& attr, c dc.SetBrush(*wxBLACK_BRUSH); dc.SetPen(*wxBLACK_PEN); dc.SetTextForeground(*wxWHITE); + dc.SetBackgroundMode(wxTRANSPARENT); } else { dc.SetTextForeground(attr.GetTextColour()); - } - if (attr.HasFlag(wxTEXT_ATTR_BACKGROUND_COLOUR) && attr.GetBackgroundColour().IsOk()) - { - dc.SetBackgroundMode(wxSOLID); - dc.SetTextBackground(attr.GetBackgroundColour()); + if (attr.HasFlag(wxTEXT_ATTR_BACKGROUND_COLOUR) && attr.GetBackgroundColour().IsOk()) + { + dc.SetBackgroundMode(wxSOLID); + dc.SetTextBackground(attr.GetBackgroundColour()); + } + else + dc.SetBackgroundMode(wxTRANSPARENT); } - else - dc.SetBackgroundMode(wxTRANSPARENT); - + while (hasTabs) { // the string has a tab