Fix computation of max total width for container cells in wxHTML
We could end up with 0 max total width because we could assign the value of the child max total width, which could have been 0, just because the child "width", which is actually the total available width for the container cells (and a child of a container cell can, of course, be another container cell), was greater than our own total width so far. This is confusing because it might be expected that "width" is always less than "max total width", but actually this is (almost) never the case for the container cells. Closes #10263.
This commit is contained in:
@@ -824,8 +824,9 @@ void wxHtmlContainerCell::Layout(int w)
|
||||
if (curLineWidth > m_MaxTotalWidth)
|
||||
m_MaxTotalWidth = curLineWidth;
|
||||
|
||||
if (wxMax(cell->GetWidth(), cell->GetMaxTotalWidth()) > m_MaxTotalWidth)
|
||||
if (cell->GetMaxTotalWidth() > m_MaxTotalWidth)
|
||||
m_MaxTotalWidth = cell->GetMaxTotalWidth();
|
||||
|
||||
curLineWidth = 0;
|
||||
}
|
||||
else
|
||||
|
Reference in New Issue
Block a user