From 39492b0cd78ab1f9517c556b36236066e86b18ba Mon Sep 17 00:00:00 2001 From: Enrico Forestieri Date: Wed, 6 Aug 2014 02:21:18 +0200 Subject: [PATCH] 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 (except in those cases where it makes a difference, in which case they are automatically inserted by LyX). --- src/Row.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Row.cpp b/src/Row.cpp index 023286e9cd..aeede91d85 100644 --- a/src/Row.cpp +++ b/src/Row.cpp @@ -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; -- 2.39.2