X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/4dcfef961d0a83c58951d50471108da4c1262cb3..9ce192d417eb9eb614bcf8510e91dac318706249:/src/generic/scrolwin.cpp?ds=inline diff --git a/src/generic/scrolwin.cpp b/src/generic/scrolwin.cpp index e217fe5adb..6834384fad 100644 --- a/src/generic/scrolwin.cpp +++ b/src/generic/scrolwin.cpp @@ -658,12 +658,13 @@ void wxScrolledWindow::OnChar(wxKeyEvent& event) szy = -1; } + int dsty; switch ( event.KeyCode() ) { case WXK_PAGEUP: case WXK_PRIOR: - int y = sty - (5 * cliy / 6); - Scroll(-1, (y == -1) ? 0 : newy); + dsty = sty - (5 * cliy / 6); + Scroll(-1, (dsty == -1) ? 0 : dsty); break; case WXK_PAGEDOWN: