X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/467e3168b33200bf6d62317294799363ed7dd50e..05ac7ac5785ef0ddb1bd04585f3c59c5d53089be:/src/mac/scrolbar.cpp diff --git a/src/mac/scrolbar.cpp b/src/mac/scrolbar.cpp index 075c1efc8a..68d403ae26 100644 --- a/src/mac/scrolbar.cpp +++ b/src/mac/scrolbar.cpp @@ -15,6 +15,11 @@ #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 )