]> git.lyx.org Git - lyx.git/blobdiff - src/insets/insettabular.C
more cleanup:
[lyx.git] / src / insets / insettabular.C
index 4990ce2936e4a067e5964d9a2416e5ac188eaf35..849bf95079b7966784bcc9eb737913a072acdc6f 100644 (file)
@@ -246,7 +246,7 @@ void InsetTabular::read(Buffer const & buf, LyXLex & lex)
 }
 
 
-void InsetTabular::metrics(MetricsInfo & mi, Dimension & dim) const
+bool InsetTabular::metrics(MetricsInfo & mi, Dimension & dim) const
 {
        //lyxerr << "InsetTabular::metrics: " << mi.base.bv << " width: " <<
        //      mi.base.textwidth << "\n";
@@ -300,7 +300,9 @@ void InsetTabular::metrics(MetricsInfo & mi, Dimension & dim) const
        dim.asc = tabular.getAscentOfRow(0);
        dim.des = tabular.getHeightOfTabular() - dim.asc;
        dim.wid = tabular.getWidthOfTabular() + 2 * ADD_TO_TABULAR_WIDTH;
+       bool const changed = dim_ != dim;
        dim_ = dim;
+       return changed;
 }
 
 
@@ -498,8 +500,7 @@ void InsetTabular::doDispatch(LCursor & cur, FuncRequest & cmd)
                        && (&bvcur.selBegin().inset() != this || !tablemode(bvcur)))) {
                        cur.selection() = false;
                        setCursorFromCoordinates(cur, cmd.x, cmd.y);
-                       cur.resetAnchor();
-                       bvcur = cur;
+                       cur.bv().mouseSetCursor(cur);
                        break;
                }
 
@@ -659,7 +660,7 @@ void InsetTabular::doDispatch(LCursor & cur, FuncRequest & cmd)
        // insert file functions
        case LFUN_FILE_INSERT_ASCII_PARA:
        case LFUN_FILE_INSERT_ASCII: {
-               // FIXME: We don't know the encoding of filenames
+               // FIXME UNICODE
                string const tmpstr = getContentsOfAsciiFile(&cur.bv(), to_utf8(cmd.argument()), false);
                // FIXME: We don't know the encoding of the file
                if (!tmpstr.empty() && !insertAsciiString(cur.bv(), from_utf8(tmpstr), false))