From 143e2719f50c27850552474c6e9281adc451566e Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sat, 17 Dec 2005 19:19:45 +0000 Subject: [PATCH] corrected DoGetVirtualSize() to return at least our real size git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@36416 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/common/wincmn.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/common/wincmn.cpp b/src/common/wincmn.cpp index 05f22c324f..4f7aac9bfd 100644 --- a/src/common/wincmn.cpp +++ b/src/common/wincmn.cpp @@ -834,14 +834,14 @@ void wxWindowBase::DoSetVirtualSize( int x, int y ) wxSize wxWindowBase::DoGetVirtualSize() const { - if ( m_virtualSize.IsFullySpecified() ) - return m_virtualSize; - + // we should use the entire client area so if it is greater than our + // virtual size, expand it to fit (otherwise if the window is big enough we + // wouldn't be using parts of it) wxSize size = GetClientSize(); - if ( m_virtualSize.x != wxDefaultCoord ) + if ( m_virtualSize.x > size.x ) size.x = m_virtualSize.x; - if ( m_virtualSize.y != wxDefaultCoord ) + if ( m_virtualSize.y >= size.y ) size.y = m_virtualSize.y; return size; -- 2.50.0