Angus Leeming wrote:
> * the Save as document defaults/use class defaults stuff.
>
> I've little idea about what should be going on here. Could someone
> experienced try it out?
I think that this will do (cf. QDocument.C):
bool FormDocument::input(FL_OBJECT * ob, long)
{
...
} else if (ob == dialog_->button_save_defaults) {
apply();
controller().saveAsDefault();
} else if (ob == dialog_->button_reset_defaults) {
BufferParams & params = controller().params();
params.textclass = combo_doc_class->get() - 1;
params.useClassDefaults();
UpdateLayoutDocument(params);
}
...
bool saveParamsAsDefault(BufferParams const ¶ms)
could then vanish of course.
[...]
> Thereafter, FormDocument::CheckChoiceClass can go the way of the dodo
> also I think.
But not this part:
if (lyxrc.auto_reset_options) {
params.textclass = tc;
params.useClassDefaults();
UpdateLayoutDocument(params);
} else {
// update the params which are needed in any case
// (fontsizes, pagestyle)
params.textclass = tc;
UpdateClassParams(params);
}
(cf. void QDocumentDialog::classChanged())
J�rgen.