Fix copy of multi-cells in table (#12196)

(cherry picked from commit ae892bff98)
This commit is contained in:
Juergen Spitzmueller 2021-03-12 17:41:43 +01:00
parent 4b2bb08884
commit c1e10c7185
3 changed files with 16 additions and 0 deletions

View File

@ -2158,6 +2158,13 @@ void BufferView::dispatch(FuncRequest const & cmd, DispatchResult & dr)
}
case LFUN_COPY:
// With multi-cell table content, we pass down to the inset
if (cur.inTexted() && cur.selection()
&& cur.selectionBegin().idx() != cur.selectionEnd().idx()) {
buffer_.dispatch(cmd, dr);
dispatched = dr.dispatched();
break;
}
cap::copySelection(cur);
cur.message(_("Copy"));
break;

View File

@ -4492,6 +4492,13 @@ void InsetTabular::doDispatch(Cursor & cur, FuncRequest & cmd)
}
break;
case LFUN_COPY:
if (cur.selIsMultiCell())
copySelection(cur);
else
cell(cur.idx())->dispatch(cur, cmd);
break;
case LFUN_CUT:
if (cur.selIsMultiCell()) {
if (copySelection(cur)) {

View File

@ -108,6 +108,8 @@ What's new
- Fix display of emphasize in slanted text (bug 12175).
- Fix copy of multi-cells in table (bug 12196).
* INTERNALS