Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorian Thienel2016-04-05 14:06:21 -0400
committerFlorian Thienel2016-04-05 14:06:21 -0400
commita9223d29c783a112978057ebfb097ab22ae7bb09 (patch)
tree1201cf9177ca0a74eb0067b8b04d58518600111c
parent8210aa1107f95bd783072ef82869a8c589b8812d (diff)
downloadorg.eclipse.mylyn.docs.vex-a9223d29c783a112978057ebfb097ab22ae7bb09.tar.gz
org.eclipse.mylyn.docs.vex-a9223d29c783a112978057ebfb097ab22ae7bb09.tar.xz
org.eclipse.mylyn.docs.vex-a9223d29c783a112978057ebfb097ab22ae7bb09.zip
relayout the whole table if anything inside changed
Signed-off-by: Florian Thienel <florian@thienel.org>
-rw-r--r--org.eclipse.vex.core/src/org/eclipse/vex/core/internal/boxes/Table.java10
-rw-r--r--org.eclipse.vex.core/src/org/eclipse/vex/core/internal/boxes/TableColumnLayout.java2
2 files changed, 3 insertions, 9 deletions
diff --git a/org.eclipse.vex.core/src/org/eclipse/vex/core/internal/boxes/Table.java b/org.eclipse.vex.core/src/org/eclipse/vex/core/internal/boxes/Table.java
index 89ab6e2c..03f61d8d 100644
--- a/org.eclipse.vex.core/src/org/eclipse/vex/core/internal/boxes/Table.java
+++ b/org.eclipse.vex.core/src/org/eclipse/vex/core/internal/boxes/Table.java
@@ -177,14 +177,8 @@ public class Table extends BaseBox implements IStructuralBox, IParentBox<IStruct
@Override
public boolean reconcileLayout(final Graphics graphics) {
- final int oldHeight = height;
- height = 0;
- for (int i = 0; i < children.size(); i += 1) {
- final IStructuralBox child = children.get(i);
- child.setPosition(height, 0);
- height += child.getHeight();
- }
- return oldHeight != height;
+ layout(graphics);
+ return true;
}
@Override
diff --git a/org.eclipse.vex.core/src/org/eclipse/vex/core/internal/boxes/TableColumnLayout.java b/org.eclipse.vex.core/src/org/eclipse/vex/core/internal/boxes/TableColumnLayout.java
index 885bcfe5..4eaa2afb 100644
--- a/org.eclipse.vex.core/src/org/eclipse/vex/core/internal/boxes/TableColumnLayout.java
+++ b/org.eclipse.vex.core/src/org/eclipse/vex/core/internal/boxes/TableColumnLayout.java
@@ -128,7 +128,7 @@ public class TableColumnLayout {
public int getLastIndex() {
if (parentLayout != null) {
- return Math.max(lastIndex, parentLayout.lastIndex);
+ return Math.max(lastIndex, parentLayout.getLastIndex());
}
return lastIndex;
}

Back to the top