don't update the size of a maximized TLW, whatever happens with the pane
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42301 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -109,7 +109,8 @@ void wxGenericCollapsiblePane::OnStateChange(const wxSize& sz)
|
||||
SetMinSize(sz);
|
||||
SetSize(sz);
|
||||
|
||||
wxWindow *top = wxGetTopLevelParent(this);
|
||||
wxTopLevelWindow *
|
||||
top = wxDynamicCast(wxGetTopLevelParent(this), wxTopLevelWindow);
|
||||
if ( top )
|
||||
{
|
||||
// we've changed our size, thus our top level parent needs to relayout
|
||||
@@ -131,6 +132,10 @@ void wxGenericCollapsiblePane::OnStateChange(const wxSize& sz)
|
||||
#endif
|
||||
top->GetSizer()->SetSizeHints(top);
|
||||
|
||||
|
||||
// we shouldn't attempt to resize a maximized window, whatever happens
|
||||
if ( !top->IsMaximized() )
|
||||
{
|
||||
if ( IsCollapsed() )
|
||||
{
|
||||
// use SetClientSize() and not SetSize() otherwise the size for
|
||||
@@ -145,6 +150,7 @@ void wxGenericCollapsiblePane::OnStateChange(const wxSize& sz)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void wxGenericCollapsiblePane::Collapse(bool collapse)
|
||||
{
|
||||
|
Reference in New Issue
Block a user