summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dw/table.cc10
1 files changed, 9 insertions, 1 deletions
diff --git a/dw/table.cc b/dw/table.cc
index 6708b3f0..8a46ce7c 100644
--- a/dw/table.cc
+++ b/dw/table.cc
@@ -320,11 +320,19 @@ void Table::addCell (Widget *widget, int colspan, int rowspan)
for (int col = 0; col < colspanEff; col++)
for (int row = 0; row < rowspan; row++)
if (!(col == 0 && row == 0)) {
+ int i = (curRow + row) * numCols + curCol + col;
+
+ child = children->get(i);
+ if (child) {
+ MSG("Overlapping spans in table.\n");
+ assert(child->type == Child::SPAN_SPACE);
+ delete child;
+ }
child = new Child ();
child->type = Child::SPAN_SPACE;
child->spanSpace.startCol = curCol;
child->spanSpace.startRow = curRow;
- children->set ((curRow + row) * numCols + curCol + col, child);
+ children->set (i, child);
}
// Set the "root" cell.