Do not allow copying a separator without a following par end.

This makes virtually impossible copying a separator inset whithout
also copying the end of paragraph. These insets are not supposed to
be directly inserted by users. For example, the parbreak version
represents a LaTeX paragraph break, not a LyX one. So, if it is
possible to copy and paste it by alone, an unsespecting user may be
surprised to see a paragraph break in the output but not on the LyX
screen (because of the lack of indentation, for example).
In this way, it also becomes a LyX par break from a user point of
view, not any more useful than simply introducing a par break by
hitting <return> (except in those cases where it makes a difference,
in which case they are automatically inserted by LyX).
This commit is contained in:
Enrico Forestieri 2014-08-06 02:21:18 +02:00
parent ad1a553454
commit 39492b0cd7

View File

@ -47,7 +47,7 @@ double Row::Element::pos2x(pos_type const i) const
double w = 0;
//handle first the two bounds of the element
if (i == endpos)
if (i == endpos && !(inset && inset->lyxCode() == SEPARATOR_CODE))
w = rtl ? 0 : width();
else if (i == pos || type != STRING)
w = rtl ? width() : 0;