Fix a cosmetic bug in ExtendRulesAndAlternateColour() code

Ensure that vertical rules extend to the bottom of the window on the
non-first page of the control too.

This was probably broken in 5ae2a8ebb8 (Simplify API for extending
wxListCtrl background display, 2020-11-09).

Closes https://github.com/wxWidgets/wxWidgets/pull/2130
This commit is contained in:
Marcos
2020-11-30 09:22:13 -03:00
committed by Vadim Zeitlin
parent fab9a67d23
commit cda21c8ddc

View File

@@ -2188,7 +2188,7 @@ void wxListMainWindow::OnPaint( wxPaintEvent &WXUNUSED(event) )
int x_pos = x - dev_x;
if (col < GetColumnCount()-1) x_pos -= 2;
int ruleHeight = m_extendRulesAndAlternateColour
int ruleHeight = m_extendRulesAndAlternateColour && visibleEnd > visibleTo
? clientHeight
: lastItemRect.GetBottom() + 1 - dev_y;