]> git.saurik.com Git - wxWidgets.git/blobdiff - src/mac/scrolbar.cpp
easier angle conversion wx-mac , corrected elliptic arc which sometimes filled in...
[wxWidgets.git] / src / mac / scrolbar.cpp
index 075c1efc8a7505ab58ed946d1e89f8ea94b9537a..68d403ae2624b1197ea23ce70a156cc96b7d5677 100644 (file)
 
 #include "wx/defs.h"
 
+#ifndef WX_PRECOMP
+    #include "wx/intl.h"
+    #include "wx/log.h"
+#endif // WX_PRECOMP
+
 #include "wx/scrolbar.h"
 #include "wx/mac/uma.h"
 
@@ -134,12 +139,15 @@ void wxScrollBar::MacHandleControlClick( WXWidget control , wxInt16 controlpart
         nScrollInc = 0 ;
         scrollEvent = wxEVT_SCROLL_THUMBTRACK;
                        break ;
+                default :
+                        wxFAIL_MSG(wxT("illegal scrollbar selector"));
+                        break ;
        }
 
   int new_pos = position + nScrollInc;
 
-  if (new_pos < 0)
-      new_pos = 0;
+  if (new_pos < minPos)
+      new_pos = minPos;
   if (new_pos > maxPos)
       new_pos = maxPos;
        if ( nScrollInc )