]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/renderg.cpp
Reverted part of rev 1.92. It causes probelms on Windows when
[wxWidgets.git] / src / generic / renderg.cpp
index ef3c79568cad5cdf2530dbd37fe39b564c3c35e8..138321f6bfb3fbdcb52bd7f825b8bb34dd9e83d0 100644 (file)
 #ifndef WX_PRECOMP
     #include "wx/string.h"
     #include "wx/dc.h"
+    #include "wx/settings.h"
+    #include "wx/gdicmn.h"
 #endif //WX_PRECOMP
 
-#include "wx/gdicmn.h"
-
-#include "wx/settings.h"
 #include "wx/splitter.h"
 #include "wx/dcmirror.h"
 #include "wx/module.h"
@@ -231,9 +230,10 @@ wxRendererGeneric::DrawTreeItemButton(wxWindow * WXUNUSED(win),
                                       const wxRect& rect,
                                       int flags)
 {
-    // white background
-    dc.SetPen(*wxGREY_PEN);
-    dc.SetBrush(*wxWHITE_BRUSH);
+    // store settings
+    wxDCPenChanger penChanger(dc, *wxGREY_PEN);
+    wxDCBrushChanger brushChanger(dc, *wxWHITE_BRUSH);
+
     dc.DrawRectangle(rect);
 
     // black lines