Mercurial > projects > dwt-addons
diff dwtx/ui/forms/widgets/TableWrapLayout.d @ 85:56fea7e5f0f9
Fix some runtime errors
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Fri, 20 Jun 2008 14:48:17 +0200 |
parents | 5d489b9f966c |
children | 04b47443bb01 |
line wrap: on
line diff
--- a/dwtx/ui/forms/widgets/TableWrapLayout.d Fri Jun 20 13:00:15 2008 +0200 +++ b/dwtx/ui/forms/widgets/TableWrapLayout.d Fri Jun 20 14:48:17 2008 +0200 @@ -339,7 +339,7 @@ size = new Point(size.x, td.heightHint); } td.compSize = size; - RowSpan rowspan = cast(RowSpan) rowspans.get(child); + RowSpan rowspan = rowspans.containsKey(child) ? cast(RowSpan) rowspans.get(child) : null; if (rowspan is null) { rowHeights[i] = Math.max(rowHeights[i], size.y); } else @@ -431,7 +431,7 @@ int width = td.compSize.x-td.indent; width = Math.min(width, colWidth); int slotHeight = rowHeights[row]; - RowSpan rowspan = cast(RowSpan) rowspans.get(control); + RowSpan rowspan = rowspans.containsKey(control) ? cast(RowSpan) rowspans.get(control) : null; if (rowspan !is null) { slotHeight = 0; for (int i = row; i < row + td.rowspan; i++) { @@ -687,7 +687,7 @@ Point size = computeSize(td.childIndex, cwidth, td.indent, td.maxWidth, td.maxHeight); cy = size.y; } - RowSpan rowspan = cast(RowSpan) rowspans.get(child); + RowSpan rowspan = rowspans.containsKey(child) ? cast(RowSpan) rowspans.get(child) : null; if (rowspan !is null) { // don't take the height of this child into acount // because it spans multiple rows