don't set virtual size of the window to (0, 0) if scrollbars are removed from it

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@32870 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2005-03-17 22:27:28 +00:00
parent e731c9ada2
commit f18f464cba
3 changed files with 13 additions and 3 deletions

View File

@@ -407,7 +407,10 @@ void wxScrolledWindow::SetScrollbars( int pixelsPerUnitX, int pixelsPerUnitY,
// a sizer might override this manual scrollbar setting in old code.
// m_targetWindow->SetVirtualSizeHints( noUnitsX * pixelsPerUnitX, noUnitsY * pixelsPerUnitY );
m_targetWindow->SetVirtualSize( noUnitsX * pixelsPerUnitX, noUnitsY * pixelsPerUnitY );
int w = noUnitsX * pixelsPerUnitX;
int h = noUnitsY * pixelsPerUnitY;
m_targetWindow->SetVirtualSize( w ? w : wxDefaultCoord,
h ? h : wxDefaultCoord);
if (!noRefresh)
{