X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ba763a45d85d8b70326da65895b7753f86fc3ea3..8ae4f08661d7b324d5cd7aa16ab1a7b2810d94f2:/src/common/gbsizer.cpp diff --git a/src/common/gbsizer.cpp b/src/common/gbsizer.cpp index 2dde7a8410..3bd6720e68 100644 --- a/src/common/gbsizer.cpp +++ b/src/common/gbsizer.cpp @@ -547,11 +547,13 @@ void wxGridBagSizer::RecalcSizes() height = 0; for(idx=row; idx <= endrow; idx++) - height += m_rowHeights[idx] + m_vgap; + height += m_rowHeights[idx]; + height += (endrow - row) * m_vgap; // add a vgap for every row spanned width = 0; for (idx=col; idx <= endcol; idx++) - width += m_colWidths[idx] + m_hgap; + width += m_colWidths[idx]; + width += (endcol - col) * m_hgap; // add a hgap for every col spanned SetItemBounds(item, colpos[col], rowpos[row], width, height);