Use wxDCXXXChanger classes instead of manual SetXXX() calls
No real changes, but the code is slightly shorter, maybe more clear and will be easier to maintain (because more difficult to break accidentally) in the future.
This commit is contained in:
parent
aa7c99b275
commit
de7fa05245
@ -3156,13 +3156,11 @@ void wxListCtrl::OnPaint(wxPaintEvent& event)
|
||||
|
||||
if (useDrawFix)
|
||||
{
|
||||
dc.SetPen(*wxTRANSPARENT_PEN);
|
||||
dc.SetBrush(wxBrush(GetBackgroundColour()));
|
||||
wxDCPenChanger changePen(dc, *wxTRANSPARENT_PEN);
|
||||
wxDCBrushChanger changeBrush(dc, GetBackgroundColour());
|
||||
|
||||
dc.DrawRectangle(0, topItemRect.GetY() - gap,
|
||||
clientSize.GetWidth(), gap);
|
||||
|
||||
dc.SetPen(pen);
|
||||
dc.SetBrush(*wxTRANSPARENT_BRUSH);
|
||||
}
|
||||
|
||||
const int numCols = GetColumnCount();
|
||||
|
Loading…
Reference in New Issue
Block a user