]> source.dussan.org Git - vaadin-framework.git/commitdiff
Fixed some sign bugs with mouse wheel scrolling in VFilterSelect #4518
authorJohn Alhroos <john.ahlroos@itmill.com>
Fri, 12 Aug 2011 06:53:25 +0000 (06:53 +0000)
committerJohn Alhroos <john.ahlroos@itmill.com>
Fri, 12 Aug 2011 06:53:25 +0000 (06:53 +0000)
svn changeset:20334/svn branch:6.7

src/com/vaadin/terminal/gwt/client/ui/VFilterSelect.java

index 108a68f73f64036d8207f39eb82a1c14de698403..3833bbfd484fca7d93e856c5b76068b4021d2950 100644 (file)
@@ -319,7 +319,8 @@ public class VFilterSelect extends Composite implements Paintable, Field,
         }
 
         /*
-         * Timer for scrolling pages up or down.
+         * Using a timer to scroll up or down the pages so when we receive lots
+         * of consecutive mouse wheel events the pages does not flicker.
          */
         private LazyPageScroller lazyPageScroller = new LazyPageScroller();
         private class LazyPageScroller extends Timer {
@@ -334,7 +335,7 @@ public class VFilterSelect extends Composite implements Paintable, Field,
             }
 
             public void scrollUp() {             
-               if(currentPage - pagesToScroll >= 0){
+               if(currentPage + pagesToScroll > 0){
                         pagesToScroll--;
                      cancel();
                      schedule(100);