Community
Participate
Working Groups
When the ListViewer does not contain a selection and is refreshed it loses its vertically scrolled to position. This is because AbstractListViewer removes all items and adds them back (it has to) when a refresh occurs. This is remedied in the use cases where there is a selection because the selected item is revealed after the refresh occurs. Without a selection no reveal can occur therefore it loses its position.
Created attachment 41233 [details] JUnit showing the issue
Created attachment 41406 [details] Patch for AbstractListViewer and ListViewer Added hooks to retrieve the top index before refresh and to restore the top index after refresh.
Created attachment 41407 [details] Patch for ListViewerTest
The existing tests for ComboViewer succeed with the patch.
Created attachment 50920 [details] combined patch This is one patch combining all three previous attachments, with added contribution comments.
Released >20060926. Thanks!