summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
dedcebb)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42301
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
SetMinSize(sz);
SetSize(sz);
SetMinSize(sz);
SetSize(sz);
- wxWindow *top = wxGetTopLevelParent(this);
- if (top)
+ wxTopLevelWindow *
+ top = wxDynamicCast(wxGetTopLevelParent(this), wxTopLevelWindow);
+ if ( top )
{
// we've changed our size, thus our top level parent needs to relayout
// itself
{
// we've changed our size, thus our top level parent needs to relayout
// itself
#endif
top->GetSizer()->SetSizeHints(top);
#endif
top->GetSizer()->SetSizeHints(top);
- if (IsCollapsed())
- {
- // use SetClientSize() and not SetSize() otherwise the size for
- // e.g. a wxFrame with a menubar wouldn't be correctly set
- top->SetClientSize(sz);
- }
- else
+
+ // we shouldn't attempt to resize a maximized window, whatever happens
+ if ( !top->IsMaximized() )
- // force our parent to "fit", i.e. expand so that it can honour
- // our minimal size
- top->Fit();
+ if ( IsCollapsed() )
+ {
+ // use SetClientSize() and not SetSize() otherwise the size for
+ // e.g. a wxFrame with a menubar wouldn't be correctly set
+ top->SetClientSize(sz);
+ }
+ else
+ {
+ // force our parent to "fit", i.e. expand so that it can honour
+ // our minimal size
+ top->Fit();
+ }