]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/math_gridinset.C
bug + spped fixes + small stuff
[lyx.git] / src / mathed / math_gridinset.C
index 20cd11011cad06b96aeda52248d17135a37187ed..9ed68656e3c867d535b3bd29bc56b96eb758a5a4 100644 (file)
@@ -1046,7 +1046,7 @@ void MathGridInset::splitCell(LCursor & cur)
 DispatchResult
 MathGridInset::priv_dispatch(LCursor & cur, FuncRequest const & cmd)
 {
-       lyxerr << "*** MathGridInset: request: " << cmd << endl;
+       //lyxerr << "*** MathGridInset: request: " << cmd << endl;
        switch (cmd.action) {
 
                case LFUN_MOUSE_RELEASE:
@@ -1054,7 +1054,7 @@ MathGridInset::priv_dispatch(LCursor & cur, FuncRequest const & cmd)
                        //      GridInsetMailer(*this).showDialog();
                        //      return DispatchResult(true, true);
                        //}
-                       return DispatchResult(false);
+                       return MathNestInset::priv_dispatch(cur, cmd);
 
                case LFUN_INSET_DIALOG_UPDATE:
                        GridInsetMailer(*this).updateDialog(&cur.bv());
@@ -1070,19 +1070,19 @@ MathGridInset::priv_dispatch(LCursor & cur, FuncRequest const & cmd)
                        //}
                        if (nrows() > 1)
                                delRow(cur.row());
-                       if (cur.idx() >= nargs())
-                               cur.idx() = nargs() - 1;
+                       if (cur.idx() > cur.lastidx())
+                               cur.idx() = cur.lastidx();
                        if (cur.pos() > cur.lastpos())
                                cur.pos() = cur.lastpos();
                        return DispatchResult(true, FINISHED);
 
                case LFUN_CELL_SPLIT:
-                       //recordUndo(cur, Undo::ATOMIC);
+                       ////recordUndo(cur, Undo::ATOMIC);
                        splitCell(cur);
                        return DispatchResult(true, FINISHED);
 
                case LFUN_BREAKLINE: {
-                       //recordUndo(cur, Undo::INSERT);
+                       ////recordUndo(cur, Undo::INSERT);
                        row_type const r = cur.row();
                        addRow(r);