From 389e23b867bf270a36643c7c789153c8f9617140 Mon Sep 17 00:00:00 2001 From: andy Date: Thu, 5 Jul 2007 21:25:01 +0000 Subject: [PATCH] Wrong subtraction order lead to the "extra" space available (instead of the extra space *required*) in a rowspan object being redistributed back into the span, leading to a near-doubling of the size for small objects with large span ranges. --- src/GUI/layout.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/GUI/layout.cxx b/src/GUI/layout.cxx index 8d3aae86f..12d13df7d 100644 --- a/src/GUI/layout.cxx +++ b/src/GUI/layout.cxx @@ -315,7 +315,7 @@ void LayoutWidget::doTable(bool doLayout, int* w, int* h) int total = 0; for(j=0; jrspan; j++) total += rowSizes[cell->row + j]; - int extra = total - cell->h; + int extra = cell->h - total; if(extra > 0) { for(j=0; jrspan; j++) { int chunk = extra / (cell->rspan - j); @@ -328,7 +328,7 @@ void LayoutWidget::doTable(bool doLayout, int* w, int* h) int total = 0; for(j=0; jcspan; j++) total += colSizes[cell->col + j]; - int extra = total - cell->w; + int extra = cell->w - total; if(extra > 0) { for(j=0; jcspan; j++) { int chunk = extra / (cell->cspan - j);