mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-25 19:07:45 +00:00
Fix c&p of tabular data between different LyX instances (#4448)
This commit is contained in:
parent
7869960888
commit
3718ff9a15
@ -5184,6 +5184,16 @@ void InsetTabular::doDispatch(Cursor & cur, FuncRequest & cmd)
|
||||
break;
|
||||
}
|
||||
}
|
||||
else if (theClipboard().hasTextContents(Clipboard::LyXTextType)) {
|
||||
// This might be tabular data from another LyX instance. Check!
|
||||
docstring const clip =
|
||||
theClipboard().getAsText(Clipboard::PlainTextType);
|
||||
if (clip.find_first_of(from_ascii("\t\n")) != docstring::npos) {
|
||||
FuncRequest ncmd = FuncRequest(LFUN_CLIPBOARD_PASTE, cmd.argument());
|
||||
doDispatch(cur, ncmd);
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!cur.selIsMultiCell())
|
||||
cell(cur.idx())->dispatch(cur, cmd);
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user