Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 276675

Summary: [Table] TopIndex is not correctly updated after disposal of items
Product: [RT] RAP Reporter: Jordan Yakovchev <dany>
Component: RWTAssignee: Project Inbox <rap-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: ivan, ruediger.herrmann
Version: 1.2   
Target Milestone: 1.2 RC3   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
Test case
none
Proposed patch as described in comment #2.
none
Proposed patch with test case. ivan: review?

Description Jordan Yakovchev CLA 2009-05-18 05:31:56 EDT
Build ID: M20090211-1700

Steps To Reproduce:
1. In the control demo select Table tab
2. Check MULTI button
3. Add 85 items for total 100 items
4. Scroll down and select last item
5. Scroll up to item 50
6. While holding SHIFT key click with mouse on item 50 to select items from 50 to 100
7. Scroll to first item
8. While holding CTRL key click it with mouse to add it to selection
9. Press the button "Dispose Selected Item"
10. The result - just last item is visible on screen after disposal.

More information:
Comment 1 Ivan Furnadjiev CLA 2009-05-27 06:27:49 EDT
Created attachment 137300 [details]
Test case

In some cases setting the selection change the top index.
Comment 2 Ivan Furnadjiev CLA 2009-05-27 07:29:55 EDT
In TableLCA#readSelection() replacing:
table.setSelection( newSelection ); // line 171
with:
table.deselectAll();
table.select( newSelection );
fixes the described scenario. But the general problem (in the attached test case) persist.
Comment 3 Ivan Furnadjiev CLA 2009-05-27 07:55:55 EDT
Created attachment 137311 [details]
Proposed patch as described in comment #2.
Comment 4 Ivan Furnadjiev CLA 2009-05-27 07:57:54 EDT
Please review the proposed patch.
Comment 5 Ivan Furnadjiev CLA 2009-05-27 11:00:00 EDT
Created attachment 137348 [details]
Proposed patch with test case.

Please review.
Comment 6 RĂ¼diger Herrmann CLA 2009-05-28 07:00:22 EDT
+1
Comment 7 Ivan Furnadjiev CLA 2009-05-28 07:36:19 EDT
Changes are in CVS HEAD.