]> git.lyx.org Git - features.git/blobdiff - src/CutAndPaste.cpp
Fix bug #8891 (wrong depth of copied text)
[features.git] / src / CutAndPaste.cpp
index 844a119ca25dd5ffb2375b3aabd6524773ed8187..9e7ddd31feaf3987bc393ec33b7fa572e48f2cd2 100644 (file)
@@ -209,10 +209,8 @@ pasteSelectionHelper(DocIterator const & cur, ParagraphList const & parlist,
                if (tmpbuf->params().depth() > max_depth)
                        tmpbuf->params().depth(max_depth);
 
-               // Only set this from the 2nd on as the 2nd depends
-               // for maxDepth still on pit.
-               if (tmpbuf != insertion.begin())
-                       max_depth = tmpbuf->getMaxDepthAfter();
+               // Set max_depth for the next paragraph
+               max_depth = tmpbuf->getMaxDepthAfter();
 
                // Set the inset owner of this paragraph.
                tmpbuf->setInsetOwner(target_inset);