]> git.lyx.org Git - features.git/commit
Fix bug #8891 (wrong depth of copied text)
authorGeorg Baum <baum@lyx.org>
Sat, 22 Feb 2014 10:02:50 +0000 (11:02 +0100)
committerGeorg Baum <baum@lyx.org>
Sat, 22 Feb 2014 10:02:50 +0000 (11:02 +0100)
commit270201ed67f6aec9a075f7dae65085ac64b5a36d
treecce90388b3f888312b2b0bf4abe51671214dcc3d
parent02bde93d2a920cc2d6d11877897684fb31f63c55
Fix bug #8891 (wrong depth of copied text)

This was an obvious thinko: When pasting a paragraph list the depth of the
pasted paragraphs need to be adjusted, so that no paragraph has a negative
depth afterwards. However, the maximum allowed depth was only adjusted after
the second and following pasted paragraphs. Since the computed value was only
used for the subsequent paragrph this meant that the second paragraph did
still use the same maximum allowed depth as the first one, which came from the
paragraph the text as pasted into. This was wrong e.g. in case the outside
paragraph was a standard paragraph (max_depth = 0), and the first pasted
paragraph was an enumeration (max_depth = 1). Therefore, max_depth needs to
be adjusted also after the first pasted paragaph. Since the adjustment is
done aftre max_depth was used for the current paragraph the condition
mentioned in the comment is still met.
src/CutAndPaste.cpp