X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9ffab13f6dd63d90b1fbde51d3b4529033ddf480..923608c3ac95e2c705fb0f49ab48fbe62fc871bd:/src/generic/splitter.cpp diff --git a/src/generic/splitter.cpp b/src/generic/splitter.cpp index d3ed2d45c9..6e084f1696 100644 --- a/src/generic/splitter.cpp +++ b/src/generic/splitter.cpp @@ -69,7 +69,7 @@ BEGIN_EVENT_TABLE(wxSplitterWindow, wxWindow) WX_EVENT_TABLE_CONTROL_CONTAINER(wxSplitterWindow) END_EVENT_TABLE() -WX_DELEGATE_TO_CONTROL_CONTAINER(wxSplitterWindow) +WX_DELEGATE_TO_CONTROL_CONTAINER(wxSplitterWindow, wxWindow) bool wxSplitterWindow::Create(wxWindow *parent, wxWindowID id, const wxPoint& pos, @@ -681,17 +681,25 @@ void wxSplitterWindow::SizeWindows() { w1 = size1; w2 = w - 2*border - sash - w1; - h1 = + if (w2 < 0) + w2 = 0; h2 = h - 2*border; + if (h2 < 0) + h2 = 0; + h1 = h2; x2 = size2; y2 = border; } else // horz splitter { - w1 = w2 = w - 2*border; + if (w2 < 0) + w2 = 0; + w1 = w2; h1 = size1; h2 = h - 2*border - sash - h1; + if (h2 < 0) + h2 = 0; x2 = border; y2 = size2; }