diff options
author | Sauli Tähkäpää <sauli@vaadin.com> | 2014-04-16 14:19:11 +0300 |
---|---|---|
committer | Sauli Tähkäpää <sauli@vaadin.com> | 2014-04-16 14:19:11 +0300 |
commit | 202514e6c03877b40bbb17fbb74cf4d68eb21503 (patch) | |
tree | 2528d17a52bb82805decdcd66ec6a0889812f508 /client | |
parent | 6c022639adfcf2c0b8db52062b32a0479b07ad7d (diff) | |
parent | 591996b94e7b7c432708611819087b8e03d21ea5 (diff) | |
download | vaadin-framework-202514e6c03877b40bbb17fbb74cf4d68eb21503.tar.gz vaadin-framework-202514e6c03877b40bbb17fbb74cf4d68eb21503.zip |
Merge commit '591996b' into 7.2
Conflicts:
build.properties
Change-Id: Ie3cf9bd0af8aba7debf4626d2db77afea37e7cb3
Diffstat (limited to 'client')
-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 |
2 files changed, 11 insertions, 8 deletions
diff --git a/client/src/com/vaadin/client/ui/VScrollTable.java b/client/src/com/vaadin/client/ui/VScrollTable.java index b2ba590d8e..438a201984 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 |