summaryrefslogtreecommitdiffstats
path: root/client
diff options
context:
space:
mode:
authorLeif Åstrand <leif@vaadin.com>2015-03-20 16:51:45 +0200
committerLeif Åstrand <leif@vaadin.com>2015-03-20 16:51:45 +0200
commit7fa43952ca1b1e26afe79f5c0a75f9e735431be0 (patch)
tree7464dac0d98c1127bef647d12f1237e77b87bc30 /client
parent04272699b8f429a2bc3b8f0a41e20a604213895e (diff)
downloadvaadin-framework-7fa43952ca1b1e26afe79f5c0a75f9e735431be0.tar.gz
vaadin-framework-7fa43952ca1b1e26afe79f5c0a75f9e735431be0.zip
Use special logic for allocating selection col widths (#17091)
Change-Id: I2d0a80a26e8211d6f5e9110e1476f857803b4d3f
Diffstat (limited to 'client')
-rw-r--r--client/src/com/vaadin/client/widgets/Grid.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/client/src/com/vaadin/client/widgets/Grid.java b/client/src/com/vaadin/client/widgets/Grid.java
index cb9e9c55d1..f4a5b0961c 100644
--- a/client/src/com/vaadin/client/widgets/Grid.java
+++ b/client/src/com/vaadin/client/widgets/Grid.java
@@ -2528,7 +2528,7 @@ public class Grid<T> extends ResizeComposite implements
final double widthFixed = Math.max(widthAsIs,
column.getMinimumWidth());
defaultExpandRatios = defaultExpandRatios
- && column.getExpandRatio() == -1;
+ && (column.getExpandRatio() == -1 || column == selectionColumn);
if (isFixedWidth) {
columnSizes.put(indexOfColumn(column), widthFixed);
@@ -2546,7 +2546,8 @@ public class Grid<T> extends ResizeComposite implements
.getExpandRatio());
final double newWidth = column.getWidthActual();
final double maxWidth = getMaxWidth(column);
- boolean shouldExpand = newWidth < maxWidth && expandRatio > 0;
+ boolean shouldExpand = newWidth < maxWidth && expandRatio > 0
+ && column != selectionColumn;
if (shouldExpand) {
totalRatios += expandRatio;
columnsToExpand.add(column);