aboutsummaryrefslogtreecommitdiffstats
path: root/src/com/vaadin
diff options
context:
space:
mode:
authorArtur Signell <artur.signell@itmill.com>2011-10-04 07:06:05 +0000
committerArtur Signell <artur.signell@itmill.com>2011-10-04 07:06:05 +0000
commitaad0e3eb74ab3a7afd66d80ada3a7802607b758a (patch)
tree4c7133a8394daf50c180872260bb1b065608f7f3 /src/com/vaadin
parentd814eae356a706048983cf73a53318ec8840c2cc (diff)
downloadvaadin-framework-aad0e3eb74ab3a7afd66d80ada3a7802607b758a.tar.gz
vaadin-framework-aad0e3eb74ab3a7afd66d80ada3a7802607b758a.zip
#6494 Reverted [21428] as it causes infinite loops in certain situations
svn changeset:21543/svn branch:6.7
Diffstat (limited to 'src/com/vaadin')
-rw-r--r--src/com/vaadin/terminal/gwt/client/ui/VScrollTable.java25
1 files changed, 3 insertions, 22 deletions
diff --git a/src/com/vaadin/terminal/gwt/client/ui/VScrollTable.java b/src/com/vaadin/terminal/gwt/client/ui/VScrollTable.java
index 731b388040..fc10ad97c7 100644
--- a/src/com/vaadin/terminal/gwt/client/ui/VScrollTable.java
+++ b/src/com/vaadin/terminal/gwt/client/ui/VScrollTable.java
@@ -5622,28 +5622,13 @@ public class VScrollTable extends FlowPanel implements Table, ScrollHandler,
return;
}
+ this.width = width;
if (width != null && !"".equals(width)) {
super.setWidth(width);
- int innerPixels = Util.getRequiredWidth(this) - getBorderWidth();
+ int innerPixels = getOffsetWidth() - getBorderWidth();
if (innerPixels < 0) {
- /*
- * If innerPixels becomes negative it means that something has
- * gone wrong with the width calculations (most likely a timing
- * issue where offsetWidth is returning 0). Setting innerPixels
- * to 0 here and hope for the best will cause issues like #6494.
- * Instead we defer the width setting so we know that the
- * offsetwidth return a sane value
- */
- final String deferredWidth = width;
- Scheduler.get().scheduleDeferred(new ScheduledCommand() {
- public void execute() {
- setWidth(deferredWidth);
- }
- });
- return;
+ innerPixels = 0;
}
-
- this.width = width;
setContentWidth(innerPixels);
// readjust undefined width columns
@@ -5652,7 +5637,6 @@ public class VScrollTable extends FlowPanel implements Table, ScrollHandler,
} else {
// Undefined width
- this.width = width;
super.setWidth("");
// Readjust size of table
@@ -5815,9 +5799,6 @@ public class VScrollTable extends FlowPanel implements Table, ScrollHandler,
* @param pixels
*/
private void setContentWidth(int pixels) {
- if (pixels == 0) {
- VConsole.error("Setting width " + pixels + "px");
- }
tHead.setWidth(pixels + "px");
scrollBodyPanel.setWidth(pixels + "px");
tFoot.setWidth(pixels + "px");