[EMAIL PROTECTED] wrote:
Author: spitz
Date: Sun Oct 12 11:36:00 2008
New Revision: 26860
URL: http://www.lyx.org/trac/changeset/26860
Log:
** fix bug 2114. Fileformat change.
** fix bug 5343 (patch from Richard, prerequisite for the other fix)
I thought about this for quite a while last night after I uploaded that
patch. I THINK it is correct. But I'm not absolutely sure. Let me
explain the source of the bug, and then the two options for fixing it.
With the introduction of modules came a distinction between the base
class and the document class. The former corresponds to the main layout
file; the latter is that plus the modules (or the document-specific
layout, or whatever else there could be). The way the code is now, the
parameters for GuiDocument come from the *document class*. So when we
set the base class in classChanged, we also need to recreate the
document class---otherwise, we still have the old one---and that's what
the makeDocumentClass() class call does.
So the parameters for GuiDocument now include the effects of loaded
modules. And what I'm not sure about is whether that is correct. If it
is, we have a different bug, namely, that adding or removing a module
doesn't update the document class.
That said, can modules---and should modules---be able to affect what's
displayed in this dialog? Right now, I don't think they can, so the
crucial question is "should". If the answer is "no", then a better
solution would be to get the parameters from the base class, rather than
from the document class.
Thoughts?
rh