Pavel Sanda wrote:
Richard Heck wrote:
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.
this paragraph would be nice to have as docs somewhere in textclass if its
not already there :)
Something like this is in TextClass.cpp, or thereabouts, but I'll add it
to GuiDocument, too.
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?
what is the example of such an effect?
Layout files can, for example, set which font sizes are allowed in a
document, or set default class options, and these then should be
displayed in Document>Settings. (The bug was that this did not happen
when a new layout file was chosen, but only when the dialog was closed
and reopened.) I guess a module COULD do that kind of thing, and there's
no real reason to prohibit it.
Richard