JMarc, don't you think we should just remove the line ?
thanks john -- "Faced with the prospect of rereading this book, I would rather have my brains ripped out by a plastic fork." - Charles Cooper on "Business at the Speed of Thought"
Index: src/ChangeLog =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/ChangeLog,v retrieving revision 1.443 diff -u -r1.443 ChangeLog --- src/ChangeLog 2001/12/05 23:21:26 1.443 +++ src/ChangeLog 2001/12/06 01:51:48 @@ -1,3 +1,7 @@ +2001-12-06 John Levon <[EMAIL PROTECTED]> + + * text2.C: keep selection on a setFont() + 2001-12-05 John Levon <[EMAIL PROTECTED]> * lyxtext.h: Index: src/text2.C =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/text2.C,v retrieving revision 1.183 diff -u -r1.183 text2.C --- src/text2.C 2001/12/05 16:11:46 1.183 +++ src/text2.C 2001/12/06 01:51:53 @@ -788,11 +788,11 @@ redoParagraphs(bview, selection.start, selection.end.par()->next()); // we have to reset the selection, because the - // geometry could have changed + // geometry could have changed, but we keep + // it for user convenience setCursor(bview, selection.start.par(), selection.start.pos()); selection.cursor = cursor; setCursor(bview, selection.end.par(), selection.end.pos()); - clearSelection(); setSelection(bview); setCursor(bview, tmpcursor.par(), tmpcursor.pos(), true, tmpcursor.boundary()); @@ -872,7 +872,7 @@ y -= tmprow->height(); } } - + // we can set the refreshing parameters now status(bview, LyXText::NEED_MORE_REFRESH); refresh_y = y; @@ -886,11 +886,12 @@ tmppar = 0; while (tmppar != endpar) { removeRow(tmprow->next()); - if (tmprow->next()) + if (tmprow->next()) { tmppar = tmprow->next()->par(); - else + } else { tmppar = 0; - } + } + } // remove the first one tmprow2 = tmprow; /* this is because tmprow->previous()