Am Donnerstag, 20. September 2001 07:08 schrieb Allan Rae:
> IMO, if the silly class change dialog had been shifted to be
> handled when Okay/Apply were pressed this bug also would have been
> fixed.
>
> > I suspect that one of the first lines of the following part of
> > FormDocument.C is to blame. Has someone an idea?
> > (The bug is probably not very annoying, since it has not been
> > detected yet. But if it's easy to fix, I'd like to do this).

> My guess is that the changes from article->book only occurred in the
> dialog and not in the buffer -- after all you never pressed Okay or
> Apply did you.  So this code will never be run if you change back to
> the original class of the document because as far as the test is
> concerned it hasn't changed.

Yes, I have a similar suspect. And it's true: if you apply the class 
change inbetween, the problem does not occur. So I think the 
comparision if (!params.textclass != tc) fails here for the reason you 
mentioned.

Question: do we need this comparision at all? I deleted it and now all 
works like a charm. Will there be any unwanted sideeffects, apart from 
the case that the class options will be reset to default even if the 
user choses the same class (article -> article), which does not disturb 
IMHO?

> You could add another bool or check to see if the class previously in
> the dialog was different or whatever but IMHO it would be a lot less
> screwing around to have simply shifted the class-change dialog to
> OK/Apply time instead of change of combox time.  This would have
> saved most of the hassles people were having with the document dialog
> hiding behind the main LyX window (except for the case of pressing
> Apply admittedly).
>
> Nobody commented on that suggestion when I made it almost two weeks
> ago now -- probably the third or fourth email of this thread.

I changed the behaviour of the class change anyway. Instead of the 
popup, we have a "Reset" button and a "Auto Reset" checkbox (class 
options will be automatically reset to defaults after class change), 
which is much more comfortable IMHO (and you don't have the popup 
hassle in this case).

However, the applied Patch deletes the comparision I mentioned. 

JMarc, this Patch is the one from yesterday *plus* the small changes. 
If you have already applied it (or in your tree), I can send you a 
small patch with only the changes after the stuff from yesterday is in 
CVS.

Thanks,
Jürgen

> Allan. (ARRae)  Still alive and kicking...

document2.diff.tar.gz

Reply via email to