Community
Participate
Working Groups
Reproducible with Controls Demo -> Tree tab from CVS HEAD. Change TreeTab.java line 119 to pack any column, but not the last. 1. Run Controls Demo -> Tree tab 2. Resize the main Shell to make all columns visible (including the "dummy" column space at the end). 3. Click on "Pack all columns" button - there is an empty space in the header between the last tree column and the "dummy" column.
Currently, left and width of the "dummy" column is updated (TableHeader.js#_renderDummyColumn) only when column width is changed. At that point, the columns have the new width, but columns left still have the old value. This leads to wrong left calculation of "dummy" column left (TableHeader.js#_getDummyColumnLeft). Adding "changeLeft" listener in TableHeader.js#add method that execute TableHeader.js#_renderDummyColumn fixes the problem, but this will trigger unnecessary _renderDummyColumn calls. Tim, what do you think?
I think that this isnt a very a elegant solution, but the entire tableheader stuff isnt very elegantly implemented to begin with. A better solution in my opinion would be to set the layout of the columns on the Tree at once, like we do with the item metrics. But your approach would be ok too if we dont have the time for refactoring this.
Fixed by adding "changeLeft" listener in TableHeader.js#add. Changes are in CVS HEAD.