]> git.saurik.com Git - wxWidgets.git/commitdiff
don't return negative size from GetPageRect
authorPaul Cornett <paulcor@bullseye.com>
Wed, 6 Sep 2006 03:01:50 +0000 (03:01 +0000)
committerPaul Cornett <paulcor@bullseye.com>
Wed, 6 Sep 2006 03:01:50 +0000 (03:01 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41026 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/common/bookctrl.cpp

index c0b1eedd9cdc1f7e03beaa4023c2ff2d746e155d..ffae3d708da7c67332915c8397b6fb52c422a9ff 100644 (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;
     }