On Thu, Feb 28, 2002 at 06:21:49PM +0100, Jean-Marc Lasgouttes wrote: > >>>>> "Martin" == Martin Vermeer <[EMAIL PROTECTED]> writes:
... > I'd say you should have the more complicated one call the other one. > This seems straightforward, but check that the seemingly identical > codes are actually identical. > > JMarc Jean-Marc, you cannot even begin to appreciate know how appropriate that warning was! The first parameters are actually different. (I used earlier a 'blink comparator' technique between two consoles to verify that this was indeed a case of code xeroxing. This technique is also used in finding asteroids/supernovae from plate pairs and any little change jumps to the eye. But I did not check the headers) Anyway, here the patch. Tested on a variety of font change/style change/ cut'n-paste operations, and appears to work for me. Correct the english spelling, if you feel so inclined today. Note the shortness of the patch. I left the eliminated code in an #if 0 comment for now. 2002-03-01 Martin Vermeer <[EMAIL PROTECTED]> * text2.C: eliminate setCharFont code duplication. Martin
Index: text2.C =================================================================== RCS file: /cvs/lyx/lyx-devel/src/text2.C,v retrieving revision 1.205 diff -u -p -r1.205 text2.C --- text2.C 2002/02/28 17:50:18 1.205 +++ text2.C 2002/03/01 09:08:08 @@ -264,6 +264,10 @@ void LyXText::setCharFont(BufferView * b } } + // Plug thru to version below: + setCharFont(buf, par, pos, font); + +#if 0 LyXLayout const & layout = textclasslist.Style(buf->params.textclass, par->getLayout()); @@ -306,6 +310,7 @@ void LyXText::setCharFont(BufferView * b font.reduce(layoutfont); par->setFont(pos, font); +#endif }
msg33747/pgp00000.pgp
Description: PGP signature