diff --git a/src/common/sizer.cpp b/src/common/sizer.cpp index bd513f73ef..390c769e71 100644 --- a/src/common/sizer.cpp +++ b/src/common/sizer.cpp @@ -731,6 +731,8 @@ wxGridSizer::wxGridSizer( int rows, int cols, int vgap, int hgap ) m_cols = cols; m_vgap = vgap; m_hgap = hgap; + if (m_rows == 0 && m_cols == 0) + m_rows = 1; } wxGridSizer::wxGridSizer( int cols, int vgap, int hgap ) @@ -739,6 +741,8 @@ wxGridSizer::wxGridSizer( int cols, int vgap, int hgap ) m_cols = cols; m_vgap = vgap; m_hgap = hgap; + if (m_rows == 0 && m_cols == 0) + m_rows = 1; } int wxGridSizer::CalcRowsCols(int& nrows, int& ncols) const