need to AdjustScrollbars() after changing the virtual size in CalcDimensions()

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@55628 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2008-09-14 23:06:36 +00:00
parent 69367c566e
commit ace8d849d4

View File

@@ -4688,10 +4688,11 @@ void wxGrid::CalcDimensions()
if ( y >= h ) if ( y >= h )
y = wxMax( h - 1, 0 ); y = wxMax( h - 1, 0 );
// do set scrollbar parameters // update the virtual size and refresh the scrollbars to reflect it
SetScrollRate(m_scrollLineX, m_scrollLineY); SetScrollRate(m_scrollLineX, m_scrollLineY);
m_gridWin->SetVirtualSize(w, h); m_gridWin->SetVirtualSize(w, h);
Scroll(x, y); Scroll(x, y);
AdjustScrollbars();
// if our OnSize() hadn't been called (it would if we have scrollbars), we // if our OnSize() hadn't been called (it would if we have scrollbars), we
// still must reposition the children // still must reposition the children