don't return negative size from GetPageRect

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41026 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Paul Cornett
2006-09-06 03:01:50 +00:00
parent 003b64a7ba
commit 6a9e44d55c

View File

@@ -310,6 +310,8 @@ wxRect wxBookCtrlBase::GetPageRect() const
case wxBK_BOTTOM:
rectPage.height -= size.y + GetInternalBorder();
if (rectPage.height < 0)
rectPage.height = 0;
break;
case wxBK_LEFT:
@@ -318,6 +320,8 @@ wxRect wxBookCtrlBase::GetPageRect() const
case wxBK_RIGHT:
rectPage.width -= size.x + GetInternalBorder();
if (rectPage.width < 0)
rectPage.width = 0;
break;
}