commit c1e10c71850adf8e5a19160e24e32c696aaf01a6
Author: Juergen Spitzmueller <[email protected]>
Date: Fri Mar 12 17:41:43 2021 +0100
Fix copy of multi-cells in table (#12196)
(cherry picked from commit ae892bff98962359e3a29d0d3bc7e69bdc3ea72b)
---
src/BufferView.cpp | 7 +++++++
src/insets/InsetTabular.cpp | 7 +++++++
status.23x | 2 ++
3 files changed, 16 insertions(+), 0 deletions(-)
diff --git a/src/BufferView.cpp b/src/BufferView.cpp
index ba8ba83..182bfdf 100644
--- a/src/BufferView.cpp
+++ b/src/BufferView.cpp
@@ -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;
diff --git a/src/insets/InsetTabular.cpp b/src/insets/InsetTabular.cpp
index b88d782..30a5b85 100644
--- a/src/insets/InsetTabular.cpp
+++ b/src/insets/InsetTabular.cpp
@@ -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)) {
diff --git a/status.23x b/status.23x
index 8a52f53..c0eeca3 100644
--- a/status.23x
+++ b/status.23x
@@ -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
--
lyx-cvs mailing list
[email protected]
http://lists.lyx.org/mailman/listinfo/lyx-cvs