From 4f14745fce765857741b67ecf35c7fc167920e98 Mon Sep 17 00:00:00 2001 From: John Thacker Date: Wed, 8 Feb 2023 06:11:59 -0500 Subject: 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 --- ui/qt/packet_list.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ui') diff --git a/ui/qt/packet_list.cpp b/ui/qt/packet_list.cpp index 361d180d07..40ab5ab3db 100644 --- a/ui/qt/packet_list.cpp +++ b/ui/qt/packet_list.cpp @@ -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); -- cgit v1.2.3