Don't use hidden items for size calc (patch 1698314)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45406 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2007-04-11 21:53:13 +00:00
parent 70cab5b769
commit af579c91c2

View File

@@ -537,6 +537,9 @@ void wxGridBagSizer::RecalcSizes()
{ {
int row, col, endrow, endcol; int row, col, endrow, endcol;
wxGBSizerItem* item = (wxGBSizerItem*)node->GetData(); wxGBSizerItem* item = (wxGBSizerItem*)node->GetData();
if ( item->IsShown() )
{
item->GetPos(row, col); item->GetPos(row, col);
item->GetEndPos(endrow, endcol); item->GetEndPos(endrow, endcol);
@@ -551,6 +554,7 @@ void wxGridBagSizer::RecalcSizes()
width += (endcol - col) * m_hgap; // add a hgap for every col spanned width += (endcol - col) * m_hgap; // add a hgap for every col spanned
SetItemBounds(item, colpos[col], rowpos[row], width, height); SetItemBounds(item, colpos[col], rowpos[row], width, height);
}
node = node->GetNext(); node = node->GetNext();
} }