Qt: Fencepost error in minimap/intelligent scrollbar

The location of the next line should be based off one row larger
than the current row.

This fixes an issue where all the lines drawn in the intelligent
scrollbar are off by one - the color intended to be drawn for
the first packet never appears, the first packet corresponds to
the line for the second packet, etc., and there is a line at
the bottom that can never be colored in.

Fix #18850
This commit is contained in:
John Thacker 2023-02-08 06:11:59 -05:00
parent 3123185b6e
commit 4f14745fce
1 changed files with 1 additions and 1 deletions

View File

@ -2052,7 +2052,7 @@ void PacketList::drawNearOverlay()
bgcolor = &color_filter->bg_color;
}
int next_line = (row - start) * o_height / o_rows;
int next_line = (row - start + 1) * o_height / o_rows;
if (bgcolor) {
QColor color(ColorUtils::fromColorT(bgcolor));
painter.fillRect(0, cur_line, o_width, next_line - cur_line, color);