mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 13:18:28 +00:00
Cleanup CutAndPaste.cpp
This commit is contained in:
parent
1f22a2520a
commit
d5fe3337c6
@ -218,10 +218,10 @@ pasteSelectionHelper(DocIterator const & cur, ParagraphList const & parlist,
|
||||
|
||||
// set the paragraphs to plain layout if necessary
|
||||
DocumentClassConstPtr newDocClass = buffer.params().documentClassPtr();
|
||||
if (cur.inset().usePlainLayout()) {
|
||||
bool forcePlainLayout = target_inset->forcePlainLayout();
|
||||
Layout const & plainLayout = newDocClass->plainLayout();
|
||||
Layout const & defaultLayout = newDocClass->defaultLayout();
|
||||
if (cur.inset().usePlainLayout()) {
|
||||
bool forcePlainLayout = target_inset->forcePlainLayout();
|
||||
for (auto & par : insertion) {
|
||||
Layout const & parLayout = par.layout();
|
||||
if (forcePlainLayout || parLayout == defaultLayout)
|
||||
@ -229,8 +229,6 @@ pasteSelectionHelper(DocIterator const & cur, ParagraphList const & parlist,
|
||||
}
|
||||
} else {
|
||||
// check if we need to reset from plain layout
|
||||
Layout const & defaultLayout = newDocClass->defaultLayout();
|
||||
Layout const & plainLayout = newDocClass->plainLayout();
|
||||
for (auto & par : insertion) {
|
||||
Layout const & parLayout = par.layout();
|
||||
if (parLayout == plainLayout)
|
||||
|
Loading…
Reference in New Issue
Block a user