fix width of unconstrained cells in insettabular

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8935 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Jean-Marc Lasgouttes 2004-08-14 21:55:38 +00:00
parent c6204d60c2
commit 4979ab7ab4
2 changed files with 7 additions and 2 deletions

View File

@ -1,5 +1,8 @@
2004-08-14 Jean-Marc Lasgouttes <lasgouttes@lyx.org>
* insettabular.C (metrics): when the width of a cell is zero(),
let it use as much space as it can
* insettext.C (editXY): compilation fix
* insetinclude.C (priv_dispatch): fix showing dialog on mouse

View File

@ -235,8 +235,10 @@ void InsetTabular::metrics(MetricsInfo & mi, Dimension & dim) const
++cell;
Dimension dim;
MetricsInfo m = mi;
m.base.textwidth =
tabular.column_info[j].p_width.inPixels(mi.base.textwidth);
LyXLength p_width = tabular.column_info[j].p_width;
if (!p_width.zero()) {
m.base.textwidth = p_width.inPixels(mi.base.textwidth);
}
tabular.getCellInset(cell).metrics(m, dim);
maxAsc = max(maxAsc, dim.asc);
maxDesc = max(maxDesc, dim.des);