]> git.saurik.com Git - wxWidgets.git/commitdiff
Applied patch [ 1378183 ] Mac: wxNotebook::HitTest off by one
authorJulian Smart <julian@anthemion.co.uk>
Thu, 19 Jan 2006 11:03:56 +0000 (11:03 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Thu, 19 Jan 2006 11:03:56 +0000 (11:03 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@36999 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/mac/carbon/notebmac.cpp

index dbea2f10221ab86d50a5be4f5333a895ed59e670..1e6e98a2393f69928b50cc976d169496ad946995 100644 (file)
@@ -353,7 +353,7 @@ int wxNotebook::HitTest(const wxPoint& pt, long * flags) const
     }
 
     if ( outPart >= 1 && outPart <= countPages )
-        resultV = outPart ;
+        resultV = outPart - 1 ;
 #endif // TARGET_API_MAC_OSX
 
     if (flags != NULL)
@@ -361,7 +361,7 @@ int wxNotebook::HitTest(const wxPoint& pt, long * flags) const
         *flags = 0;
 
         // we cannot differentiate better
-        if (resultV >= 1)
+        if (resultV >= 0)
             *flags |= wxNB_HITTEST_ONLABEL;
         else
             *flags |= wxNB_HITTEST_NOWHERE;