From e52d6dbca3978c1872ac61baf819ec14bdd28c60 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=A1clav=20Slav=C3=ADk?= Date: Sat, 16 Oct 1999 15:37:13 +0000 Subject: [PATCH] wxHtmlCell::AdjustPagebreak now works correctly git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4023 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/html/htmlcell.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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; } }