On Sun, Feb 26, 2006 at 12:26:52PM +0100, Georg Baum wrote:
> Am Samstag, 25. Februar 2006 16:33 schrieb Martin Vermeer:
> 
> > - entered multi-paragraph ERT, where empty paragraphs were created by
> > two different methods:
> > 1) press ENTER at end of paragraph
> > 2) press ENTER at start of paragraph
> 
> 2) is the only case I could find that would not work with my initial 
> version.

Yes... that's because in that case it is Paragraph that initializes the
font, either here

    321         return LyXFont(LyXFont::ALL_INHERIT, getParLanguage(bparams));
with
   1495         return bparams.language;

or here

    358         return LyXFont(LyXFont::ALL_INHERIT, bparams.language);

depending.

So, a "proper" fix would make Paragraph "sense" whether it is inside an
ERT inset. Sounds ugly, doesn't it? Perhaps your original idea of using
plaintext strings wasn't so bad... but not now.
 
> > The patch may be a bit overkill, but it certainly works.
> 
> It really does, I did some heavy testing, too. I added ChangeLog entries 
> and some comments. I also readded the font settings in init(). This 
> avoids problems if the brute force fix in doDispatch() gets removed.

Not going to happen as long as ERT contains real paragraphs... 
 
> There are two changes that I did but that are not strictly necessary (but 
> do not harm either):
> - remove unsed setFont declaration in insettext.h
> - fix language handling in unused InsertERT constrcutor and comment it 
> out. One could as well remove the constructor completely. I changed it 
> because I wanted to make sure that it does not introduce language 
> problems again when it will be used later.

OK, defensive thinking.
 
> I think the patch is now ready for 1.4.0. Can it go in?

I am happy with it.

- Martin

Attachment: pgpbxBy5LwV3S.pgp
Description: PGP signature

Reply via email to