wxHTML: fixed bug in tables rendering when rowspan was used

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@9540 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Václav Slavík
2001-03-18 23:34:17 +00:00
parent afa3e1edcd
commit 2fa3b70778

View File

@@ -367,11 +367,11 @@ void wxHtmlTableCell::Layout(int w)
int fullwid; int fullwid;
wxHtmlContainerCell *actcell; wxHtmlContainerCell *actcell;
for (actrow = 0; actrow <= m_NumRows; actrow++) ypos[actrow] = m_Spacing; ypos[0] = m_Spacing;
for (actrow = 1; actrow <= m_NumRows; actrow++) ypos[actrow] = -1;
for (actrow = 0; actrow < m_NumRows; actrow++) for (actrow = 0; actrow < m_NumRows; actrow++)
{ {
if (ypos[actrow] == -1) ypos[actrow] = ypos[actrow-1];
// 3a. sub-layout and detect max height: // 3a. sub-layout and detect max height:
for (actcol = 0; actcol < m_NumCols; actcol++) { for (actcol = 0; actcol < m_NumCols; actcol++) {
@@ -390,10 +390,8 @@ void wxHtmlTableCell::Layout(int w)
} }
} }
for (actrow = 0; actrow < m_NumRows; actrow++) for (actrow = 0; actrow < m_NumRows; actrow++)
{ {
// 3b. place cells in row & let'em all have same height: // 3b. place cells in row & let'em all have same height:
for (actcol = 0; actcol < m_NumCols; actcol++) for (actcol = 0; actcol < m_NumCols; actcol++)
@@ -410,7 +408,6 @@ void wxHtmlTableCell::Layout(int w)
actcell->Layout(fullwid); actcell->Layout(fullwid);
actcell->SetPos(m_ColsInfo[actcol].leftpos, ypos[actrow]); actcell->SetPos(m_ColsInfo[actcol].leftpos, ypos[actrow]);
} }
} }
m_Height = ypos[m_NumRows]; m_Height = ypos[m_NumRows];
delete[] ypos; delete[] ypos;