mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-10 18:58:10 +00:00
Fix application of PARAGRAPH_PARAMS* in selection.
- Setting in the last paragraph of selection was not applied
at certain conditions (i.e. relative cursor position in first
paragraph > rel.c.pos. in last paragraph).
Getting back + fixing typo from e2b42b1726
.
https://www.mail-archive.com/lyx-devel@lists.lyx.org/msg220019.html
This commit is contained in:
parent
cfe094a380
commit
fe953000ed
@ -2908,7 +2908,8 @@ void Text::setParagraphs(Cursor const & cur, docstring const & arg, bool merge)
|
|||||||
Layout priorlayout;
|
Layout priorlayout;
|
||||||
Cursor c(cur.bv());
|
Cursor c(cur.bv());
|
||||||
c.setCursor(cur.selectionBegin());
|
c.setCursor(cur.selectionBegin());
|
||||||
for ( ; c <= cur.selectionEnd() ; ++c.pit()) {
|
pit_type const last_pit = cur.selectionEnd().pit();
|
||||||
|
for ( ; c.pit() <= last_pit ; ++c.pit()) {
|
||||||
Paragraph & par = c.paragraph();
|
Paragraph & par = c.paragraph();
|
||||||
ParagraphParameters params = par.params();
|
ParagraphParameters params = par.params();
|
||||||
params.read(argument, merge);
|
params.read(argument, merge);
|
||||||
@ -2934,7 +2935,8 @@ void Text::setParagraphs(Cursor const & cur, ParagraphParameters const & p)
|
|||||||
Layout priorlayout;
|
Layout priorlayout;
|
||||||
Cursor c(cur.bv());
|
Cursor c(cur.bv());
|
||||||
c.setCursor(cur.selectionBegin());
|
c.setCursor(cur.selectionBegin());
|
||||||
for ( ; c < cur.selectionEnd() ; ++c.pit()) {
|
pit_type const last_pit = cur.selectionEnd().pit();
|
||||||
|
for ( ; c.pit() <= last_pit ; ++c.pit()) {
|
||||||
Paragraph & par = c.paragraph();
|
Paragraph & par = c.paragraph();
|
||||||
// Changes to label width string apply to all paragraphs
|
// Changes to label width string apply to all paragraphs
|
||||||
// with same layout in a sequence.
|
// with same layout in a sequence.
|
||||||
|
Loading…
Reference in New Issue
Block a user