]> git.lyx.org Git - features.git/commitdiff
disable LFUN_TABULAR_INSERT when multiple cells are selected (bug 1837)
authorJürgen Spitzmüller <spitz@lyx.org>
Thu, 16 Jun 2005 15:20:09 +0000 (15:20 +0000)
committerJürgen Spitzmüller <spitz@lyx.org>
Thu, 16 Jun 2005 15:20:09 +0000 (15:20 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@10077 a592a061-630c-0410-9148-cb99ea01b6c8

src/insets/ChangeLog
src/insets/insettabular.C

index 687d24c4f22e3a0c2ccc78688cc4f6d9c40012cd..995b46095a3937a5d021317e24f7349a2f7006c5 100644 (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>
 
        * insetoptarg.C (InsetOptArg): make the inset open by default
index fee633e961214d4ba3f5b11fbc246ebae0807337..cb0fb4b0fe5d1d27b31247779f379ca6f81f24a9 100644 (file)
@@ -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: