]> 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>
Thu, 18 Jun 2020 13:48:45 +0000 (15:48 +0200)
commitc8a96bee578874acecdd732583de957aa10825e8
treeeb5fb114f485ed776150214accb5c3a390c2e4a3
parentd5de14768b8dbb241db57291147849ce27570faa
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