Fix yet another thinko in the math grid paste code

This is a Hydra!
This commit is contained in:
Juergen Spitzmueller 2020-06-30 17:23:58 +02:00
parent b84e497ab6
commit d0cbcda3b9

View File

@ -1624,7 +1624,7 @@ void InsetMathGrid::doDispatch(Cursor & cur, FuncRequest & cmd)
} else {
// multiple cells
cur.recordUndoInset();
col_type startcol = col(cur.idx());
col_type startcol = col(cur.idx());
row_type startrow = cur.row();
col_type oldncols = ncols();
col_type numcols =
@ -1648,8 +1648,8 @@ void InsetMathGrid::doDispatch(Cursor & cur, FuncRequest & cmd)
}
// append columns for the left over horizontal cells
for (InsetMath::col_type c = numcols; c < grid.ncols(); ++c) {
addCol(c + 1);
idx_type i = index(r + startrow, c + 1);
addCol(c + startcol);
idx_type i = index(r + startrow, c + startcol);
cell(i).append(grid.cell(grid.index(r, c)));
++numcols;
}