]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/gbsizer.cpp
moving focus rect overlap problems to the vis region of a window
[wxWidgets.git] / src / common / gbsizer.cpp
index 2dde7a8410faf469a56d6759fffabd8ffd68963d..3bd6720e68727d7e402f4f54ecc49e5a4e3174c3 100644 (file)
@@ -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);