X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ee146bca1b2d76b3e486c66a2d5ad15e44f2cbd0..72c23f8e2944bf479f439ff14cf952f8985162fe:/src/common/wincmn.cpp diff --git a/src/common/wincmn.cpp b/src/common/wincmn.cpp index 5e7143c74a..7a1e6e8577 100644 --- a/src/common/wincmn.cpp +++ b/src/common/wincmn.cpp @@ -528,9 +528,9 @@ void wxWindowBase::Centre(int direction) // fits the window around the children void wxWindowBase::Fit() { - if ( GetChildren().GetCount() > 0 ) + if ( !GetChildren().empty() ) { - SetSize(GetBestSize()); + SetClientSize(GetBestSize()); } //else: do nothing if we have no children }