]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/sizer.cpp
refactored code to create hidden window in one place only; use it from wxTimer; unreg...
[wxWidgets.git] / src / common / sizer.cpp
index a711c7b0c2b75181f7f63e39569eb6ff5cb4973e..3ba28288ecc151ca0095556171a81f5e535b1c28 100644 (file)
@@ -914,6 +914,8 @@ wxGridSizer::wxGridSizer( int rows, int cols, int vgap, int hgap )
     , m_vgap( vgap )
     , m_hgap( hgap )
 {
+    if (m_rows == 0 && m_cols == 0)
+        m_rows = 1;
 }
 
 wxGridSizer::wxGridSizer( int cols, int vgap, int hgap )
@@ -922,6 +924,8 @@ wxGridSizer::wxGridSizer( int cols, int vgap, int hgap )
     , m_vgap( vgap )
     , m_hgap( hgap )
 {
+    if (m_rows == 0 && m_cols == 0)
+        m_rows = 1;
 }
 
 int wxGridSizer::CalcRowsCols(int& nrows, int& ncols) const