Merge branch 'wxhtml-total-width'

Fix computation of max total width for container cells in wxHTML.

See https://github.com/wxWidgets/wxWidgets/pull/1504
This commit is contained in:
Vadim Zeitlin
2019-08-27 13:09:51 +02:00

View File

@@ -292,8 +292,9 @@ wxString wxHtmlCell::GetDescription() const
wxString wxHtmlCell::Dump(int indent) const
{
wxString s(' ', indent);
s += wxString::Format("%s at (%d, %d) %dx%d",
GetDescription(), m_PosX, m_PosY, m_Width, m_Height);
s += wxString::Format("%s(%p) at (%d, %d) %dx%d",
GetDescription(), this,
m_PosX, m_PosY, GetMaxTotalWidth(), m_Height);
if ( !m_id.empty() )
s += wxString::Format(" [id=%s]", m_id);
@@ -823,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