diff options
-rw-r--r-- | client/src/com/vaadin/client/ui/VScrollTable.java | 9 | ||||
-rw-r--r-- | client/src/com/vaadin/client/ui/table/TableConnector.java | 10 | ||||
-rw-r--r-- | uitest/src/com/vaadin/tests/tb3/ScreenshotTB3Test.java | 2 |
3 files changed, 12 insertions, 9 deletions
diff --git a/client/src/com/vaadin/client/ui/VScrollTable.java b/client/src/com/vaadin/client/ui/VScrollTable.java index b0cd614e42..2db4fe85b8 100644 --- a/client/src/com/vaadin/client/ui/VScrollTable.java +++ b/client/src/com/vaadin/client/ui/VScrollTable.java @@ -1132,6 +1132,9 @@ public class VScrollTable extends FlowPanel implements HasWidgets, // cell to accomodate for the size of the sort arrow. HeaderCell sortedHeader = tHead.getHeaderCell(sortColumn); if (sortedHeader != null) { + // Mark header as sorted now. Any earlier marking would lead to + // columns with wrong sizes + sortedHeader.setSorted(true); tHead.resizeCaptionContainer(sortedHeader); } // Also recalculate the width of the captionContainer element in the @@ -3344,11 +3347,7 @@ public class VScrollTable extends FlowPanel implements HasWidgets, if (col.hasAttribute("sortable")) { c.setSortable(true); - if (cid.equals(sortColumn)) { - c.setSorted(true); - } else { - c.setSorted(false); - } + c.setSorted(false); } else { c.setSortable(false); } diff --git a/client/src/com/vaadin/client/ui/table/TableConnector.java b/client/src/com/vaadin/client/ui/table/TableConnector.java index 610f2f8010..d2bd06a753 100644 --- a/client/src/com/vaadin/client/ui/table/TableConnector.java +++ b/client/src/com/vaadin/client/ui/table/TableConnector.java @@ -303,9 +303,13 @@ public class TableConnector extends AbstractHasComponentsConnector implements getWidget().tabIndex = getState().tabIndex; getWidget().setProperTabIndex(); - if (getWidget().initializedAndAttached) { - getWidget().resizeSortedColumnForSortIndicator(); - } + Scheduler.get().scheduleFinally(new ScheduledCommand() { + + @Override + public void execute() { + getWidget().resizeSortedColumnForSortIndicator(); + } + }); // Remember this to detect situations where overflow hack might be // needed during scrolling diff --git a/uitest/src/com/vaadin/tests/tb3/ScreenshotTB3Test.java b/uitest/src/com/vaadin/tests/tb3/ScreenshotTB3Test.java index 9e2aa4cb78..261a1c1b2e 100644 --- a/uitest/src/com/vaadin/tests/tb3/ScreenshotTB3Test.java +++ b/uitest/src/com/vaadin/tests/tb3/ScreenshotTB3Test.java @@ -107,7 +107,7 @@ public abstract class ScreenshotTB3Test extends AbstractTB3Test { for (File referenceFile : referenceFiles) { if (testBench(driver).compareScreen(referenceFile)) { // There might be failure files because of retries in TestBench. - deleteFailureFiles(referenceFile); + deleteFailureFiles(getErrorFileFromReference(referenceFile)); break; } else { failedReferenceFiles.add(referenceFile); |