disable LFUN_TABULAR_INSERT when multiple cells are selected (bug 1837)

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@10077 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Jürgen Spitzmüller 2005-06-16 15:20:09 +00:00
parent f397e61e72
commit 7fd5dc56be
2 changed files with 9 additions and 2 deletions

View File

@ -1,3 +1,8 @@
2005-06-16 Jürgen Spitzmüller <j.spitzmueller@gmx.de>
* insettabular.C (getStatus): disable LFUN_TABULAR_INSERT
when multiple cells are selected (bug 1837).
2005-05-31 Jean-Marc Lasgouttes <lasgouttes@lyx.org> 2005-05-31 Jean-Marc Lasgouttes <lasgouttes@lyx.org>
* insetoptarg.C (InsetOptArg): make the inset open by default * insetoptarg.C (InsetOptArg): make the inset open by default

View File

@ -246,10 +246,11 @@ void InsetTabular::metrics(MetricsInfo & mi, Dimension & dim) const
Dimension dim; Dimension dim;
MetricsInfo m = mi; MetricsInfo m = mi;
LyXLength p_width = tabular.column_info[j].p_width; LyXLength p_width = tabular.column_info[j].p_width;
if (!p_width.zero()) { if (!p_width.zero())
m.base.textwidth = p_width.inPixels(mi.base.textwidth); m.base.textwidth = p_width.inPixels(mi.base.textwidth);
}
tabular.getCellInset(cell)->metrics(m, dim); tabular.getCellInset(cell)->metrics(m, dim);
if (!p_width.zero())
dim.wid = m.base.textwidth;
maxAsc = max(maxAsc, dim.asc); maxAsc = max(maxAsc, dim.asc);
maxDesc = max(maxDesc, dim.des); maxDesc = max(maxDesc, dim.des);
tabular.setWidthOfCell(cell, dim.wid); tabular.setWidthOfCell(cell, dim.wid);
@ -986,6 +987,7 @@ bool InsetTabular::getStatus(LCursor & cur, FuncRequest const & cmd,
// disable these with multiple cells selected // disable these with multiple cells selected
case LFUN_INSET_INSERT: case LFUN_INSET_INSERT:
case LFUN_TABULAR_INSERT:
case LFUN_INSERT_CHARSTYLE: case LFUN_INSERT_CHARSTYLE:
case LFUN_INSET_FLOAT: case LFUN_INSET_FLOAT:
case LFUN_INSET_WIDE_FLOAT: case LFUN_INSET_WIDE_FLOAT: