From: Paul Cornett Date: Wed, 6 Sep 2006 03:01:50 +0000 (+0000) Subject: don't return negative size from GetPageRect X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/6a9e44d55c3576522179d8d76ac127675b4acd7a don't return negative size from GetPageRect git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41026 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/common/bookctrl.cpp b/src/common/bookctrl.cpp index c0b1eedd9c..ffae3d708d 100644 --- a/src/common/bookctrl.cpp +++ b/src/common/bookctrl.cpp @@ -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; }