Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 336340 - [TableColumn] Moving "0 width" columns
Summary: [TableColumn] Moving "0 width" columns
Status: RESOLVED FIXED
Alias: None
Product: RAP
Classification: RT
Component: RWT (show other bugs)
Version: 1.4   Edit
Hardware: All All
: P2 minor (vote)
Target Milestone: 1.4 M7   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-02-04 07:47 EST by Tiber Sept CLA
Modified: 2011-04-12 03:42 EDT (History)
1 user (show)

See Also:


Attachments
Creates a table with 5 columns, third one's width is 0 (5.00 KB, text/x-java)
2011-02-04 07:50 EST, Tiber Sept CLA
no flags Details
Quickfix (849 bytes, patch)
2011-02-04 08:11 EST, Tiber Sept CLA
ivan: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.