From 339a86785473c0d2a2de35313c9b85f13b9b7ffa Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 22 Apr 2007 15:17:01 +0000 Subject: [PATCH] don't leave gaps around hidden columns/rows in wxFlexGridSizer (closes bug 1659872; part of patch 1667343) [backport from HEAD] git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@45579 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/common/sizer.cpp | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/common/sizer.cpp b/src/common/sizer.cpp index a229acc32a..6cc1207d8e 100644 --- a/src/common/sizer.cpp +++ b/src/common/sizer.cpp @@ -1474,7 +1474,9 @@ void wxFlexGridSizer::AdjustForFlexDirection() // and now fill it with the largest value for ( n = 0; n < count; ++n ) { - array[n] = largest; + // don't touch hidden rows + if ( array[n] != -1 ) + array[n] = largest; } } } @@ -1514,9 +1516,7 @@ void wxFlexGridSizer::AdjustForGrowables(const wxSize& sz, const wxSize& minsz, { if (m_growableRows[idx] >= nrows ) continue; - if (m_rowHeights[ m_growableRows[idx] ] == -1) - m_rowHeights[ m_growableRows[idx] ] = 0; - else + if (m_rowHeights[ m_growableRows[idx] ] != -1) { int delta = (sz.y - minsz.y); if (sum_proportions == 0) @@ -1566,9 +1566,7 @@ void wxFlexGridSizer::AdjustForGrowables(const wxSize& sz, const wxSize& minsz, { if (m_growableCols[idx] >= ncols ) continue; - if (m_colWidths[ m_growableCols[idx] ] == -1) - m_colWidths[ m_growableCols[idx] ] = 0; - else + if (m_colWidths[ m_growableCols[idx] ] != -1) { int delta = (sz.x - minsz.x); if (sum_proportions == 0)