aboutsummaryrefslogtreecommitdiffstats
path: root/src/com/vaadin/ui/Table.java
diff options
context:
space:
mode:
authorArtur Signell <artur@vaadin.com>2012-03-23 09:47:23 +0200
committerArtur Signell <artur@vaadin.com>2012-03-23 09:47:23 +0200
commitdd06b3cb695567379b381e4be28fb609d0c70074 (patch)
tree0a8d51b65e479806d30e6f1bec811cde5b296691 /src/com/vaadin/ui/Table.java
parentff5cbf06457cf483c7a68d28fa3a876e673ec242 (diff)
parent8da6b1a0c3293c7de05ebc3d451a2f2e272a13b8 (diff)
downloadvaadin-framework-dd06b3cb695567379b381e4be28fb609d0c70074.tar.gz
vaadin-framework-dd06b3cb695567379b381e4be28fb609d0c70074.zip
Merge commit '8da6b1a0c3293c7de05ebc3d451a2f2e272a13b8' from origin/6.8
Conflicts: src/com/vaadin/terminal/gwt/client/ui/VTabsheet.java
Diffstat (limited to 'src/com/vaadin/ui/Table.java')
-rw-r--r--src/com/vaadin/ui/Table.java10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/com/vaadin/ui/Table.java b/src/com/vaadin/ui/Table.java
index 5085f5b568..ff83a9ef2e 100644
--- a/src/com/vaadin/ui/Table.java
+++ b/src/com/vaadin/ui/Table.java
@@ -1091,7 +1091,9 @@ public class Table extends AbstractSelect implements Action.Container,
}
if (index > maxIndex) {
- setCurrentPageFirstItemIndex(maxIndex);
+ // Note that we pass index, not maxIndex, letting
+ // setCurrentPageFirstItemIndex handle the situation.
+ setCurrentPageFirstItemIndex(index);
return;
}
@@ -1370,9 +1372,11 @@ public class Table extends AbstractSelect implements Action.Container,
maxIndex = 0;
}
- // Ensures that the new value is valid
+ // Assume that we want to scroll to the very bottom (so that the bottom
+ // row is completely visible even if (table height) / (row height) is
+ // not an integer.)
if (newIndex > maxIndex) {
- newIndex = maxIndex;
+ newIndex = maxIndex + 1;
}
// Refresh first item id