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:
@@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user