What steps will reproduce the problem?
1. Using :SetCell(...) with an column span > 1
2. Using long texts for the spanned cell and avoid using cells without column span > 1 will emphasize the effect
3. If the width of the spanned cell is less than the total with of unspanned cells in another line the effect can't be observed.
What is the expected output? What do you see instead?
When displayed the content is shown in a single line, but the height is much bigger than a single line would require.
Instead the height seems like what it would be like if the content had been wrapped around.
What version of the product are you using?
Appears in all revisions r136 and up.
Please provide any additional information below.
Release r136 replaced the width handling for colspans: function LayoutColspans(tooltip) with function FixCellSizes(tooltip).
I found that cell:getContentHeight() returned the same value after the resizing of the columns. This is because the actual cell width used in function getContentHeight() never got touched. As far as I can see it the cell size is nowhere set at all but the calculations depend on column width values alone.
So I think you either need to adjust the cell width values to their actual values so the fontstring width is set correctly so it returns the correct fontstring height.
Or (since the whole point of the resizing is to fit the content of the cell in one line) you just continue to recalculate the line height values with cell.fontstring:GetStringHeight():
function FixCellSizes(tooltip) ... for _, line in ipairs(lines) do if #(line.cells) > 0 then local lineheight = 0 for _, cell in pairs(line.cells) do if cell and cell.fontstring then lineheight = max(lineheight, cell.fontstring:GetStringHeight()) end end if lineheight > 0 then ResizeLine(tooltip, line, lineheight) end end end end
- 10 comments
- Last updated
- Mar 30, 2012
- Nov 03, 2010
- New - Issue has not had initial review yet.
- Defect - A shortcoming, fault, or imperfection
- Medium - Normal priority.