X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/bbdee10d5f9d3aea0bd329d629d16f172038f48c..4be0198dcefaf00c7a2c59c541262a39144eb9dc:/src/generic/scrlwing.cpp?ds=sidebyside diff --git a/src/generic/scrlwing.cpp b/src/generic/scrlwing.cpp index 6244d494a0..7c84a72e18 100644 --- a/src/generic/scrlwing.cpp +++ b/src/generic/scrlwing.cpp @@ -343,6 +343,8 @@ wxScrollHelperBase::wxScrollHelperBase(wxWindow *win) m_xScrollingEnabled = m_yScrollingEnabled = true; + m_kbdScrollingEnabled = true; + m_scaleX = m_scaleY = 1.0; #if wxUSE_MOUSEWHEEL @@ -844,6 +846,12 @@ void wxScrollHelperBase::HandleOnPaint(wxPaintEvent& WXUNUSED(event)) // this they always have the priority void wxScrollHelperBase::HandleOnChar(wxKeyEvent& event) { + if ( !m_kbdScrollingEnabled ) + { + event.Skip(); + return; + } + // prepare the event this key press maps to wxScrollWinEvent newEvent; @@ -926,11 +934,7 @@ bool wxScrollHelperBase::SendAutoScrollEvents(wxScrollWinEvent& event) const void wxScrollHelperBase::StopAutoScrolling() { #if wxUSE_TIMER - if ( m_timerAutoScroll ) - { - delete m_timerAutoScroll; - m_timerAutoScroll = NULL; - } + wxDELETE(m_timerAutoScroll); #endif } @@ -1107,7 +1111,7 @@ void wxScrollHelperBase::HandleOnChildFocus(wxChildFocusEvent& event) // part of a wxComboCtrl visible and the button would still be outside the // scrolled area. But do so only if the parent fits *entirely* inside the // scrolled window. In other situations, such as nested wxPanel or - // wxScrolledWindows, the parent might be way to big to fit inside the + // wxScrolledWindows, the parent might be way too big to fit inside the // scrolled window. If that is the case, then make only the focused window // visible if ( win->GetParent() != m_targetWindow)