correction for Fit() which didn't handle properly windows positioned at (-1, -1)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@6338 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -403,6 +403,14 @@ wxSize wxWindowBase::DoGetBestSize() const
|
||||
|
||||
int wx, wy, ww, wh;
|
||||
win->GetPosition(&wx, &wy);
|
||||
|
||||
// if the window hadn't been positioned yet, assume that it is in
|
||||
// the origin
|
||||
if ( wx == -1 )
|
||||
wx = 0;
|
||||
if ( wy == -1 )
|
||||
wy = 0;
|
||||
|
||||
win->GetSize(&ww, &wh);
|
||||
if ( wx + ww > maxX )
|
||||
maxX = wx + ww;
|
||||
|
Reference in New Issue
Block a user