X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e30285abc6cb45d7e2cd66ddfe3eb460821f57ae..a148cfb64451d6553cf66d1075b654e54e908210:/src/common/wincmn.cpp?ds=sidebyside diff --git a/src/common/wincmn.cpp b/src/common/wincmn.cpp index aa805541da..65d02ccc85 100644 --- a/src/common/wincmn.cpp +++ b/src/common/wincmn.cpp @@ -634,12 +634,8 @@ wxSize wxWindowBase::DoGetVirtualSize() const { wxSize s( GetClientSize() ); - if( m_virtualSize.GetWidth() != -1 ) - s.SetWidth( m_virtualSize.GetWidth() ); - if( m_virtualSize.GetHeight() != -1 ) - s.SetHeight( m_virtualSize.GetHeight() ); - - return s; + return wxSize( wxMax( m_virtualSize.GetWidth(), s.GetWidth() ), + wxMax( m_virtualSize.GetHeight(), s.GetHeight() ) ); } // ----------------------------------------------------------------------------