Community
Participate
Working Groups
Build Identifier: eclipse: 3.5.1 nebula: 1.1.2 If dealing with a tree-structured grid (using subitems) having some of the subitems collapsed (invisible), usage of the filter may cause a fatal IllegalArgumentException. Reason is that the grid item pointed to by Grid.getTopIndex() may point to an invisible grid element in case there are less lines to display than possible: int firstVisibleIndex = vScroll.getSelection(); // the result may point to an invisible item !! if (isTree) { Iterator itemsIter = items.iterator(); int row = firstVisibleIndex + 1; while (row > 0 && itemsIter.hasNext()) { GridItem item = (GridItem) itemsIter.next(); if (item.isVisible()) { row--; if (row == 0) { firstVisibleIndex = items.indexOf(item); // this line is never executed if there are less items to display than possible } } } } topIndex = firstVisibleIndex; The solution could be to return the index of the next visible item before or after the invisible one, i.e. similar than this is performed in method Grid.getRowRange(). Reproducible: Sometimes Steps to Reproduce: 1. Open a Nebula Grid widget that got a tree structure / subitems, and which got more items than able to show at the same time on the screen (so that a scollbar appears); recommended is "Setup / Functional Code Maintenance / Saving Reasons": 2. scroll down to the very bottom. If there is no saving code that got a single subitem with the description "Test" and an arbitrary language, create one. 3. expand this last saving code, so you see the single subitem, and scroll down again. 4. type "Te" in a search condition for the description column
Might be a duplicate to bug 375327. In 375327 there is a demo application to reproduce the error.
The problem is that the scrollbar is not fixed when items are removed adding an updateScrollbars() when items get removed fixes the problem. *** This bug has been marked as a duplicate of bug 375327 ***