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

Bug 336340

Summary: [TableColumn] Moving "0 width" columns
Product: [RT] RAP Reporter: Tiber Sept <tibersept>
Component: RWTAssignee: Project Inbox <rap-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: minor    
Priority: P2 CC: tibersept
Version: 1.4   
Target Milestone: 1.4 M7   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
Creates a table with 5 columns, third one's width is 0
none
Quickfix ivan: iplog+

Description Tiber Sept CLA 2011-02-04 07:47:11 EST
Build Identifier: 20100617-1415

Swapping "0 width" columns with adjacent columns fails. The non-"0 width" column gets stuck and is positioned at the last mouseup position.

Reproducible: Always

Steps to Reproduce:
1. Create three columns, the middle one with width 0
2. Set moveable property to true 
3. Try to swap the first and third columns
4. The moved column gets stuck
5. A second move attempt positions the column properly
Comment 1 Tiber Sept CLA 2011-02-04 07:50:15 EST
Created attachment 188313 [details]
Creates a table with 5 columns, third one's width is 0
Comment 2 Tiber Sept CLA 2011-02-04 08:01:02 EST
I have modified the 

> TableColumnLCA.moveColumn( TableColumn column, int newLeft ) 

method to cancel the preserved "left" value of the passed column, so that the updated left position is sent back to client also when it has not changed. It
does not change because the width of the adjacent column is 0. More precisely
the following lines in TableColumnLCA.moveColumn

> } else {
>      table.setColumnOrder( columnOrder );
> }

look like

> } else {
>      table.setColumnOrder( columnOrder );
>      IWidgetAdapter adapter = WidgetUtil.getAdapter( column );
>      adapter.preserve( PROP_LEFT, null );
> }
Comment 3 Tiber Sept CLA 2011-02-04 08:11:29 EST
Created attachment 188314 [details]
Quickfix
Comment 4 Ivan Furnadjiev CLA 2011-04-12 03:42:29 EDT
Applied your patch to CVS HEAD as I think this is the only way to fix it. Thanks. JUnit test added.