PR# 18216 Invalid {EV_GRID}.visible_row_count

Problem Report Summary
Submitter: manus_eiffel
Category: EiffelStudio
Priority: Medium
Date: 2012/06/13
Class: Bug
Severity: Serious
Number: 18216
Release: 7.1
Confidential: No
Status: Open
Responsible:
Environment: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/536.5 (KHTML, like Gecko) Chrome/19.0.1084.56 Safari/536.5
Synopsis: Invalid {EV_GRID}.visible_row_count

Description
I just found a bug in Vision2 which impacts the suggestion list. The issue is that if you have 4 shown items, but that you hide item 2 and 3, the grid only shows one item.

Looking at the code there is 2 bugs I'd say.

#1 `perform_vertical_compuation' is calling `recompute_row_offsets' which calculates the number of visible row, however it starts from the place you start modifying the visibility of rows, and then calculate the number of visible rows and then assign it to `visible_row_count' in the grid. But that's wrong, because, it forgot to take into account the number of visible rows before the modified index.

#2 `recomputed_row_offsets' is actually using `visible_row_count' in its computation and that's bad since we are in the midst of recomputing it, but the worst case is that `visible_row_count' will recursively call `perform_vertical_compuation'. It might not be a bug, but I found this very surprising.
To Reproduce

										
Problem Report Interactions