don't set negative window size

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41080 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Paul Cornett
2006-09-09 02:42:48 +00:00
parent cd38dd5ba0
commit 6934602337
6 changed files with 35 additions and 13 deletions

View File

@@ -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;
}