avoid setting negative window size, see #15976

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75883 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Paul Cornett
2014-02-13 16:47:17 +00:00
parent d35ca1d7aa
commit f2e9e3b4b7

View File

@@ -1552,19 +1552,22 @@ public:
// results in assert failures/GTK+ warnings
height = 0;
}
int width = m_rect.width - 2 * border_space;
if (width < 0)
width = 0;
if (m_tabs->GetFlags() & wxAUI_NB_BOTTOM)
{
page.window->SetSize(m_rect.x + border_space,
m_rect.y + border_space,
m_rect.width - 2 * border_space,
width,
height);
}
else //TODO: if (GetFlags() & wxAUI_NB_TOP)
{
page.window->SetSize(m_rect.x + border_space,
m_rect.y + m_tabCtrlHeight,
m_rect.width - 2 * border_space,
width,
height);
}
// TODO: else if (GetFlags() & wxAUI_NB_LEFT){}