X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/db98870d823a8293e1cb91e852d830ba74374c2a..8e193f384f7b98daef459653ddb8485173fba8ba:/src/html/htmlcell.cpp diff --git a/src/html/htmlcell.cpp b/src/html/htmlcell.cpp index ac40ae3c7f..6ed7c1fa80 100644 --- a/src/html/htmlcell.cpp +++ b/src/html/htmlcell.cpp @@ -50,7 +50,7 @@ bool wxHtmlCell::AdjustPagebreak(int *pagebreak) { if ((!m_CanLiveOnPagebreak) && - m_PosY < *pagebreak && m_PosY + m_Height >= *pagebreak) { + m_PosY < *pagebreak && m_PosY + m_Height > *pagebreak) { *pagebreak = m_PosY; if (m_Next != NULL) m_Next -> AdjustPagebreak(pagebreak); return TRUE; @@ -153,14 +153,17 @@ bool wxHtmlContainerCell::AdjustPagebreak(int *pagebreak) { if (!m_CanLiveOnPagebreak) return wxHtmlCell::AdjustPagebreak(pagebreak); + else { wxHtmlCell *c = GetFirstCell(); bool rt = FALSE; + int pbrk = *pagebreak - m_PosY; while (c) { - if (c -> AdjustPagebreak(pagebreak)) rt = TRUE; + if (c -> AdjustPagebreak(&pbrk)) rt = TRUE; c = c -> GetNext(); } + if (rt) *pagebreak = pbrk + m_PosY; return rt; } }