]> git.saurik.com Git - wxWidgets.git/commitdiff
Drawing fix for generic wxTreeCtrl.
authorWłodzimierz Skiba <abx@abx.art.pl>
Mon, 22 May 2006 12:20:22 +0000 (12:20 +0000)
committerWłodzimierz Skiba <abx@abx.art.pl>
Mon, 22 May 2006 12:20:22 +0000 (12:20 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39268 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/generic/renderg.cpp

index ef3c79568cad5cdf2530dbd37fe39b564c3c35e8..cc3af3fdc5610280559ccbe183d6c415afd5f07a 100644 (file)
@@ -231,6 +231,10 @@ wxRendererGeneric::DrawTreeItemButton(wxWindow * WXUNUSED(win),
                                       const wxRect& rect,
                                       int flags)
 {
+    // store settings
+    wxPen pen(dc.GetPen());
+    wxBrush brush(dc.GetBrush());
+
     // white background
     dc.SetPen(*wxGREY_PEN);
     dc.SetBrush(*wxWHITE_BRUSH);
@@ -253,6 +257,9 @@ wxRendererGeneric::DrawTreeItemButton(wxWindow * WXUNUSED(win),
         dc.DrawLine(xMiddle, yMiddle - halfHeight,
                     xMiddle, yMiddle + halfHeight + 1);
     }
+
+    dc.SetPen(pen);
+    dc.SetBrush(brush);
 }
 
 // ----------------------------------------------------------------------------