From: Václav Slavík Date: Sun, 13 Apr 2008 12:28:11 +0000 (+0000) Subject: fixed incorrect layout width caching in wxHtmlContainerCell (patch #1931479) X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/5540b06b006428090bc790dd68c780f686f4b06a?ds=sidebyside fixed incorrect layout width caching in wxHtmlContainerCell (patch #1931479) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@53159 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/html/htmlcell.cpp b/src/html/htmlcell.cpp index 8dbdc9e830..25099e75c8 100644 --- a/src/html/htmlcell.cpp +++ b/src/html/htmlcell.cpp @@ -755,7 +755,9 @@ void wxHtmlContainerCell::Layout(int w) { wxHtmlCell::Layout(w); - if (m_LastLayout == w) return; + if (m_LastLayout == w) + return; + m_LastLayout = w; // VS: Any attempt to layout with negative or zero width leads to hell, // but we can't ignore such attempts completely, since it sometimes @@ -1011,8 +1013,6 @@ void wxHtmlContainerCell::Layout(int w) m_MaxTotalWidth += s_indent + ((m_IndentRight < 0) ? (-m_IndentRight * m_Width / 100) : m_IndentRight); MaxLineWidth += s_indent + ((m_IndentRight < 0) ? (-m_IndentRight * m_Width / 100) : m_IndentRight); if (m_Width < MaxLineWidth) m_Width = MaxLineWidth; - - m_LastLayout = w; } void wxHtmlContainerCell::UpdateRenderingStatePre(wxHtmlRenderingInfo& info,