Re: [LyX/master] Some fixups to row margins
Le 05/03/2016 16:58, Scott Kostyshak a écrit : On Sat, Mar 05, 2016 at 03:52:37PM +0100, Kornel Benko wrote: Am Samstag, 5. März 2016 um 15:42:40, schrieb Kornel BenkoPlease try this patch. I believe it to be safe, since there is an early To summarize: Your patch works. Works for me too. +1 Thanks, it is in now. JMarc
Re: [LyX/master] Some fixups to row margins
On Sat, Mar 05, 2016 at 03:52:37PM +0100, Kornel Benko wrote: > Am Samstag, 5. März 2016 um 15:42:40, schrieb Kornel Benko> > > > Please try this patch. I believe it to be safe, since there is an early > To summarize: Your patch works. Works for me too. +1 Scott signature.asc Description: PGP signature
Re: [LyX/master] Some fixups to row margins
Am Samstag, 5. März 2016 um 15:42:40, schrieb Kornel Benko> Am Samstag, 5. März 2016 um 15:38:04, schrieb Kornel Benko > > Am Samstag, 5. März 2016 um 14:00:28, schrieb Jean-Marc Lasgouttes > > > > > Le 05/03/2016 07:24, Scott Kostyshak a écrit : > > > > Start a new document. Type 'a', then do ctrl + return. The cursor is > > > > further left than it used to be, and is 1cm to the left of where a > > > > letter would be placed if you type another letter. > > > > > > Please try this patch. I believe it to be safe, since there is an early > > > return in breakRow for the case where we are already at the end of the > > > paragraph. > > > > > > JMarc > > > > > > > This patch cures it for me. > > Sorry, I was too fast. Nothing changed. > > File->New > Select List > enter: This is labeling Ctrl ENTER > Cursor stays still on the wrong line. > What a confusion. I compiled and installed lyx. I tried my example with this new lyx. It did work. I mailed that it works. Looking back at the lyx window, I saw the cursor this time on the wrong line. I mailed again, this time that it does not work. Later I saw, that I had 2 (two) lyx windows. One with wrong cursor position, one was OK. Apparently I did not close the previous lyx-instance. To summarize: Your patch works. Kornel signature.asc Description: This is a digitally signed message part.
Re: [LyX/master] Some fixups to row margins
Am Samstag, 5. März 2016 um 15:38:04, schrieb Kornel Benko> Am Samstag, 5. März 2016 um 14:00:28, schrieb Jean-Marc Lasgouttes > > > Le 05/03/2016 07:24, Scott Kostyshak a écrit : > > > Start a new document. Type 'a', then do ctrl + return. The cursor is > > > further left than it used to be, and is 1cm to the left of where a > > > letter would be placed if you type another letter. > > > > Please try this patch. I believe it to be safe, since there is an early > > return in breakRow for the case where we are already at the end of the > > paragraph. > > > > JMarc > > > > This patch cures it for me. Sorry, I was too fast. Nothing changed. File->New Select List enter: This is labeling Ctrl ENTER Cursor stays still on the wrong line. Kornel signature.asc Description: This is a digitally signed message part.
Re: [LyX/master] Some fixups to row margins
Am Samstag, 5. März 2016 um 14:00:28, schrieb Jean-Marc Lasgouttes> Le 05/03/2016 07:24, Scott Kostyshak a écrit : > > Start a new document. Type 'a', then do ctrl + return. The cursor is > > further left than it used to be, and is 1cm to the left of where a > > letter would be placed if you type another letter. > > Please try this patch. I believe it to be safe, since there is an early > return in breakRow for the case where we are already at the end of the > paragraph. > > JMarc > This patch cures it for me. Kornel signature.asc Description: This is a digitally signed message part.
Re: [LyX/master] Some fixups to row margins
Am Samstag, 5. März 2016 um 13:41:47, schrieb Jean-Marc Lasgouttes> Le 05/03/2016 08:23, Kornel Benko a écrit : > > And if done in labeling the cursor does not jump to next line. Cursor > > position will be corrected on any subsequent character. > > Looks funny. > > I am not sure that I understand this. Line break is disabled in list > labels, isn't it? How is the behavior different from 2.1.x? > > JMarc See attached after inserting Ctrl ENTER. Kornel signature.asc Description: This is a digitally signed message part.
Re: [LyX/master] Some fixups to row margins
Le 05/03/2016 07:24, Scott Kostyshak a écrit : Start a new document. Type 'a', then do ctrl + return. The cursor is further left than it used to be, and is 1cm to the left of where a letter would be placed if you type another letter. Please try this patch. I believe it to be safe, since there is an early return in breakRow for the case where we are already at the end of the paragraph. JMarc >From ae3292f4e5cb5ff1a2f1012c2dfb072d449aeb9e Mon Sep 17 00:00:00 2001 From: Jean-Marc LasgouttesDate: Sat, 5 Mar 2016 13:50:28 +0100 Subject: [PATCH] Set margins correctly for empty rows Calling breakRow ensures that everything is set correctly. --- src/TextMetrics.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/TextMetrics.cpp b/src/TextMetrics.cpp index f37e678..03467fa 100644 --- a/src/TextMetrics.cpp +++ b/src/TextMetrics.cpp @@ -478,7 +478,7 @@ bool TextMetrics::redoParagraph(pit_type const pit) pm.rows().push_back(Row()); Row & row = pm.rows()[row_index]; row.pos(first); - row.endpos(first); + breakRow(row, right_margin, pit); setRowHeight(row, pit); row.setChanged(false); int const max_row_width = max(dim_.wid, row.width()); -- 2.5.0
Re: [LyX/master] Some fixups to row margins
Le 05/03/2016 08:23, Kornel Benko a écrit : And if done in labeling the cursor does not jump to next line. Cursor position will be corrected on any subsequent character. Looks funny. I am not sure that I understand this. Line break is disabled in list labels, isn't it? How is the behavior different from 2.1.x? JMarc
Re: [LyX/master] Some fixups to row margins
Le 05/03/2016 07:24, Scott Kostyshak a écrit : Start a new document. Type 'a', then do ctrl + return. The cursor is further left than it used to be, and is 1cm to the left of where a letter would be placed if you type another letter. This is not good indeed. I'll take a look. JMarc
Re: [LyX/master] Some fixups to row margins
Am Samstag, 5. März 2016 um 01:24:15, schrieb Scott Kostyshak> On Wed, Jul 22, 2015 at 12:01:34AM +0200, Jean-Marc Lasgouttes wrote: > > commit 412a724aaf8a532adba71f8e8491c258f651a4e1 > > Author: Jean-Marc Lasgouttes > > Date: Sat Jul 18 00:07:30 2015 +0200 > > > > Some fixups to row margins > > > > In breakRow set left and right margin properly for RTL paragraphs. > > Remove corresponding code from ComputeRowMetrics. > > > > In row painter, check the use of left and right margin depending on > > context. The problem in the original text is that the various > > leftMargin() methods actually represent right margin for RTL > > paragraphs. This should be fixed eventually. > > git bisect suggests that this commit might have changed some behavior > for me regarding cursor placement. > > Start a new document. Type 'a', then do ctrl + return. The cursor is > further left than it used to be, and is 1cm to the left of where a > letter would be placed if you type another letter. And if done in labeling the cursor does not jump to next line. Cursor position will be corrected on any subsequent character. Looks funny. > Scott Kornel signature.asc Description: This is a digitally signed message part.
Re: [LyX/master] Some fixups to row margins
On Wed, Jul 22, 2015 at 12:01:34AM +0200, Jean-Marc Lasgouttes wrote: > commit 412a724aaf8a532adba71f8e8491c258f651a4e1 > Author: Jean-Marc Lasgouttes> Date: Sat Jul 18 00:07:30 2015 +0200 > > Some fixups to row margins > > In breakRow set left and right margin properly for RTL paragraphs. > Remove corresponding code from ComputeRowMetrics. > > In row painter, check the use of left and right margin depending on > context. The problem in the original text is that the various > leftMargin() methods actually represent right margin for RTL > paragraphs. This should be fixed eventually. git bisect suggests that this commit might have changed some behavior for me regarding cursor placement. Start a new document. Type 'a', then do ctrl + return. The cursor is further left than it used to be, and is 1cm to the left of where a letter would be placed if you type another letter. Scott signature.asc Description: PGP signature