]> git.saurik.com Git - wxWidgets.git/commitdiff
final (touch wood) tidy after things went pearshaped on line 666
authorRon Lee <ron@debian.org>
Wed, 8 Mar 2000 15:06:28 +0000 (15:06 +0000)
committerRon Lee <ron@debian.org>
Wed, 8 Mar 2000 15:06:28 +0000 (15:06 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@6528 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/generic/scrolwin.cpp

index 02519f2359c96d14c1ab058c74f82859cb2361be..6834384fadce8ebc2f893b04ef313ebaeae6f501 100644 (file)
@@ -633,7 +633,6 @@ void wxScrolledWindow::OnChar(wxKeyEvent& event)
         szx, szy,       // view size (total)
         clix, cliy;     // view size (on screen)
 
-    int y;
     ViewStart(&stx, &sty);
     GetClientSize(&clix, &cliy);
     GetVirtualSize(&szx, &szy);
@@ -659,12 +658,13 @@ void wxScrolledWindow::OnChar(wxKeyEvent& event)
        szy = -1;
     }
 
+    int dsty;
     switch ( event.KeyCode() )
     {
         case WXK_PAGEUP:
         case WXK_PRIOR:
-            y = sty - (5 * cliy / 6);
-            Scroll(-1, (y == -1) ? 0 : y);
+            dsty = sty - (5 * cliy / 6);
+            Scroll(-1, (dsty == -1) ? 0 : dsty);
             break;
 
         case WXK_PAGEDOWN: