From 83d76a66f66fa2da5c4ae454b0442463b79af244 Mon Sep 17 00:00:00 2001 From: Juergen Spitzmueller Date: Tue, 30 Jun 2020 09:06:40 +0200 Subject: [PATCH] Fix pasting of math grid with more rows in source than target (#11897) --- src/mathed/InsetMathGrid.cpp | 2 +- status.23x | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/mathed/InsetMathGrid.cpp b/src/mathed/InsetMathGrid.cpp index 2287afb4b2..eb8c4ffdc6 100644 --- a/src/mathed/InsetMathGrid.cpp +++ b/src/mathed/InsetMathGrid.cpp @@ -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) { diff --git a/status.23x b/status.23x index 4a465454e0..92a3fe637f 100644 --- a/status.23x +++ b/status.23x @@ -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 -- 2.39.5