Fixed incorrect ratio initialization
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28365 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
3a9d4088d3
commit
36461f5811
@ -105,13 +105,13 @@ wxSizerItem::wxSizerItem( wxWindow *window, int proportion, int flag, int border
|
||||
, m_show( true )
|
||||
, m_userData( userData )
|
||||
{
|
||||
// aspect ratio calculated from initial size
|
||||
SetRatio( m_minSize );
|
||||
|
||||
if (flag & wxFIXED_MINSIZE)
|
||||
window->SetMinSize(window->GetSize());
|
||||
m_minSize = window->GetSize();
|
||||
|
||||
// aspect ratio calculated from initial size
|
||||
SetRatio( m_minSize );
|
||||
|
||||
// m_size is calculated later
|
||||
}
|
||||
|
||||
@ -180,8 +180,6 @@ wxSize wxSizerItem::GetSize() const
|
||||
|
||||
wxSize wxSizerItem::CalcMin()
|
||||
{
|
||||
wxSize ret;
|
||||
|
||||
if (IsSizer())
|
||||
{
|
||||
m_minSize = m_sizer->GetMinSize();
|
||||
@ -189,7 +187,7 @@ wxSize wxSizerItem::CalcMin()
|
||||
// if we have to preserve aspect ratio _AND_ this is
|
||||
// the first-time calculation, consider ret to be initial size
|
||||
if ((m_flag & wxSHAPED) && !m_ratio)
|
||||
SetRatio(ret);
|
||||
SetRatio(m_minSize);
|
||||
}
|
||||
else if ( IsWindow() )
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user