mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 13:18:28 +00:00
Merge paragraphs when pasted into an inset that forbids multipars
Fixes: #8281
(cherry picked from commit 5dde4b1b3e
)
This commit is contained in:
parent
53a108e814
commit
e00b11355d
@ -142,6 +142,14 @@ pasteSelectionHelper(DocIterator const & cur, ParagraphList const & parlist,
|
||||
// Now remove all out of the pars which is NOT allowed in the
|
||||
// new environment and set also another font if that is required.
|
||||
|
||||
// Merge paragraphs that are to be pasted into a text inset
|
||||
// that does not allow multiple pars.
|
||||
InsetText * inset_text = target_inset->asInsetText();
|
||||
if (inset_text && !inset_text->allowMultiPar()) {
|
||||
while (insertion.size() > 1)
|
||||
mergeParagraph(buffer.params(), insertion, 0);
|
||||
}
|
||||
|
||||
// Convert newline to paragraph break in ParbreakIsNewline
|
||||
if (target_inset->getLayout().parbreakIsNewline()
|
||||
|| pars[pit].layout().parbreak_is_newline) {
|
||||
|
@ -173,6 +173,9 @@ What's new
|
||||
|
||||
- Fix suprious comma in book and thesis bib preview (bug 11272).
|
||||
|
||||
- Merge paragraphs when pasted into an inset that forbids multiple
|
||||
paragraphs (bug 8281).
|
||||
|
||||
|
||||
* INTERNALS
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user