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:
@@ -3156,13 +3156,11 @@ void wxListCtrl::OnPaint(wxPaintEvent& event)
|
|||||||
|
|
||||||
if (useDrawFix)
|
if (useDrawFix)
|
||||||
{
|
{
|
||||||
dc.SetPen(*wxTRANSPARENT_PEN);
|
wxDCPenChanger changePen(dc, *wxTRANSPARENT_PEN);
|
||||||
dc.SetBrush(wxBrush(GetBackgroundColour()));
|
wxDCBrushChanger changeBrush(dc, GetBackgroundColour());
|
||||||
|
|
||||||
dc.DrawRectangle(0, topItemRect.GetY() - gap,
|
dc.DrawRectangle(0, topItemRect.GetY() - gap,
|
||||||
clientSize.GetWidth(), gap);
|
clientSize.GetWidth(), gap);
|
||||||
|
|
||||||
dc.SetPen(pen);
|
|
||||||
dc.SetBrush(*wxTRANSPARENT_BRUSH);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const int numCols = GetColumnCount();
|
const int numCols = GetColumnCount();
|
||||||
|
Reference in New Issue
Block a user