Fix pasting of math grid with more rows in source than target (#11897)

This commit is contained in:
Juergen Spitzmueller 2020-06-30 09:06:40 +02:00
parent b0c8dc54b4
commit 83d76a66f6
2 changed files with 4 additions and 1 deletions

View File

@ -1666,7 +1666,7 @@ void InsetMathGrid::doDispatch(Cursor & cur, FuncRequest & cmd)
for (row_type r = numrows; r < grid.nrows(); ++r) {
for (col_type c = 0; c < grid.ncols(); ++c)
cell(i).append(grid.cell(grid.index(r, c)));
if (hline_enabled)
if (hline_enabled && r <= nrows())
rowinfo_[r].lines_ += grid.rowinfo_[r].lines_;
else {
for (unsigned int l = 0; l < grid.rowinfo_[r].lines_; ++l) {

View File

@ -51,6 +51,9 @@ What's new
* USER INTERFACE
- Fix crash when pasting math grid with more rows in source than target
(bug 11897).
- Fix problem with drawing of auto-opened insets (bug 11870).
- Fix crash when rejecting changes and the cursor is in an inset that will be