Bug 173107 - Resizing not working properly after columns moved
Summary: Resizing not working properly after columns moved
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Nebula (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P1 normal (vote)
Target Milestone: ---   Edit
Assignee: Dave Orme CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-02-06 11:54 EST by John Ye CLA
Modified: 2021-07-05 11:40 EDT (History)
0 users

See Also:


Attachments
Potential fix for resizing problem (5.84 KB, application/xped)
2007-02-06 11:59 EST, John Ye CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description John Ye CLA 2007-02-06 11:54:20 EST
Build ID: I20060512-1600

Steps To Reproduce:
1. Run CompositeTableSnippet5.java
2. move the first column to the second column
3. try to resize the columns


More information:

it looks like columnOrder[] was not applied in a couple of places:

1. ResizableGridRowLayout.java

line 166: Control resizedColumn = children[savedResizedColNum];
should probably be: Control resizedColumn = (Control) getColumnAt(row, savedResizedColNum);

line 174: Control columnToTheRightOfResizedColumn = children[savedResizedColNum + 1];
should probably be: Control columnToTheRightOfResizedColumn = (Control) getColumnAt(row, savedResizedColNum+1);

2. HeaderLayout.java

line 272: int columnWidthChange = lastWidths[resizedColumnPosition] - resizedColumnWidth;
should probably be: int columnWidthChange = lastWidths[columnOrder[resizedColumnPosition]] - resizedColumnWidth;

line 281: int columnToTheRightOfResizedColumnWidth =
                    lastWidths[resizedColumnPosition+1] + columnWidthChange;
should probably be: int columnToTheRightOfResizedColumnWidth =
                lastWidths[columnOrder[resizedColumnPosition+1]] + columnWidthChange;
Comment 1 John Ye CLA 2007-02-06 11:59:54 EST
Created attachment 58358 [details]
Potential fix for resizing problem

uploaded HeaderLayout.java and ResizableGridRowLayout.java
Comment 2 Dave Orme CLA 2008-01-25 17:43:34 EST
This fixes the row resizing problem, but the row's fields aren't ordered correctly.  I've applied the patch as it stands and should get some cycles in the next few weeks to resolve the remaining issues.
Comment 3 Dave Orme CLA 2008-02-25 14:42:56 EST
Bugs == P1
Comment 4 Dave Orme CLA 2009-04-13 13:34:00 EDT
Since I've applied this patch, I'm closing.