From 7fd5dc56be63a6f0a4f893a60c015da2ad04ab40 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrgen=20Spitzm=C3=BCller?= Date: Thu, 16 Jun 2005 15:20:09 +0000 Subject: [PATCH] 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 --- src/insets/ChangeLog | 5 +++++ src/insets/insettabular.C | 6 ++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/insets/ChangeLog b/src/insets/ChangeLog index 687d24c4f2..995b46095a 100644 --- a/src/insets/ChangeLog +++ b/src/insets/ChangeLog @@ -1,3 +1,8 @@ +2005-06-16 Jürgen Spitzmüller + + * insettabular.C (getStatus): disable LFUN_TABULAR_INSERT + when multiple cells are selected (bug 1837). + 2005-05-31 Jean-Marc Lasgouttes * insetoptarg.C (InsetOptArg): make the inset open by default diff --git a/src/insets/insettabular.C b/src/insets/insettabular.C index fee633e961..cb0fb4b0fe 100644 --- a/src/insets/insettabular.C +++ b/src/insets/insettabular.C @@ -246,10 +246,11 @@ void InsetTabular::metrics(MetricsInfo & mi, Dimension & dim) const Dimension dim; MetricsInfo m = mi; 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); - } tabular.getCellInset(cell)->metrics(m, dim); + if (!p_width.zero()) + dim.wid = m.base.textwidth; maxAsc = max(maxAsc, dim.asc); maxDesc = max(maxDesc, dim.des); tabular.setWidthOfCell(cell, dim.wid); @@ -986,6 +987,7 @@ bool InsetTabular::getStatus(LCursor & cur, FuncRequest const & cmd, // disable these with multiple cells selected case LFUN_INSET_INSERT: + case LFUN_TABULAR_INSERT: case LFUN_INSERT_CHARSTYLE: case LFUN_INSET_FLOAT: case LFUN_INSET_WIDE_FLOAT: