]> git.lyx.org Git - features.git/commit
Reset layout when inserting an inset over full paragraph(s)
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Wed, 4 Sep 2019 14:13:22 +0000 (16:13 +0200)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Wed, 11 Sep 2019 08:39:02 +0000 (10:39 +0200)
commite1be71da59e405a1c36769121b684c9d10333bff
tree5bfcdcf718a3728185bf47ca6d516ef12fa7b688
parentd76cef70a0320212adb3cfcf73aa77174802e4fc
Reset layout when inserting an inset over full paragraph(s)

1/ When inserting an inset over a selection, it makes sense if the
selection covers a complete or several paragraphs to reset the layout of
the paragraph that contains the inset to plain layout. In general the
inner inset will have the needed layout information and it does not
make sense to keep this information outside.

However, when the inset forces plain layout, it does not make sense to
do that and the outer layout is preserved.

Some code that duplicates what is done in pasteSelectionHelper is also
removed.

2/ Similarly, when dissolving an inset, do not reset the layout of the
first paragraph if the inset was alone in its own paragraph.

Note that this does not work as intended when change tracking is enabled.

Fixes bugs #10266 and #10369.
src/Text.cpp
src/Text3.cpp