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

Bug 346222

Summary: [Table] Selection does not shift after adding items
Product: [RT] RAP Reporter: Tim Buschtoens <tbuschto>
Component: RWTAssignee: Project Inbox <rap-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: tbuschto
Version: 1.4   
Target Milestone: 1.4 RC2   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
Proposed patch tbuschto: review+, tbuschto: review+

Description Tim Buschtoens CLA 2011-05-18 07:53:28 EDT
When adding an item to a table, all selections after this item will not shift, i.e. stay on the same row, thereby changing the selected item. For example:

First we have 5 items, the 4th "D" is selected: 

A, B, C, [D], E

Then we add another item "X" as the second item without changing anything else. 

The result is:

A, X, B, [C], D, E

But should be:

A, X, B, C, [D], E
Comment 1 Tim Buschtoens CLA 2011-05-18 07:55:36 EDT
Note: The Tree/Table merge (Bug 332524) will solve this issue automatically, but it will not be part of the 1.4 release.
Comment 2 Ivan Furnadjiev CLA 2011-05-18 09:19:53 EDT
Created attachment 195971 [details]
Proposed patch

The selection indices were not adjusted on the client in case of adding a new item. JS tests added.
I think this fix should go in RC2 as with 1.5 we will have a new tree/table client side implementation.
Comment 3 Tim Buschtoens CLA 2011-05-18 09:24:28 EDT
Comment on attachment 195971 [details]
Proposed patch

Good, fix is solid.
Comment 4 Ivan Furnadjiev CLA 2011-05-19 04:28:35 EDT
Applied patch to CVS HEAD and v14_Maintenance.