* Implemented BestSize cache
* Added calls to InvalidateBestSize where things affecting BestSize are modified. There are probably several other places where this still needs to be done... * Added wxWindowBase::GetBestFittingSize that will merge the BestSize into the MinSize, (if any) and return the result. * SetBestFittingSize will now only set the MinSize to the value that was passed to it, without merging in the BestSize git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28010 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -192,18 +192,9 @@ wxSize wxSizerItem::CalcMin()
|
||||
if ( IsWindow() && !(m_flag & wxFIXED_MINSIZE) )
|
||||
{
|
||||
// Since the size of the window may change during runtime, we
|
||||
// should use the current minimal size. If there is a MinSize,
|
||||
// use it, otherwise use the BestSize.
|
||||
wxSize min = m_window->GetMinSize();
|
||||
if (min.x == -1 || min.y == -1)
|
||||
{
|
||||
wxSize best = m_window->GetBestSize();
|
||||
if (min.x == -1) min.x = best.x;
|
||||
if (min.y == -1) min.y = best.y;
|
||||
}
|
||||
m_minSize = min;
|
||||
// should use the current minimal/best size.
|
||||
m_minSize = m_window->GetBestFittingSize();
|
||||
}
|
||||
|
||||
ret = m_minSize;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user