]> git.saurik.com Git - wxWidgets.git/commitdiff
Drawing correction
authorJulian Smart <julian@anthemion.co.uk>
Mon, 5 Mar 2007 16:08:15 +0000 (16:08 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Mon, 5 Mar 2007 16:08:15 +0000 (16:08 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@44613 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/richtext/richtextbuffer.cpp

index fd6a7c8423831c986e4326da0f9352c593d0c78f..ee777159c9c9aa250bf16e6e0e18f15989b0baf8 100644 (file)
@@ -4329,19 +4329,20 @@ 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)
     {