Hi,
While working on the Document Dialog I detected a bug which seems to be
there for a long time (it's in 1.1.6 too). It's very easy to reproduce:
Go to the Document Dialog and change the class. The nasty popup pops
up. Confirm the question: the class options will be reset to default.
Now change the class back to the first one immediately. Neither the
popup appears nor will the options be reset (you can see this very easy
with article -> book -> article, where the Side is set to One -> Two ->
[still] Two).
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).
Thanks,
Jürgen
void FormDocument::CheckChoiceClass(FL_OBJECT * ob, long)
{
if (!ob)
ob = class_->choice_doc_class;
lv_->prohibitInput();
unsigned int tc = combo_doc_class->get() - 1;
if (textclasslist.Load(tc)) {
// we use a copy of the bufferparams because we do not
// want to modify them yet.
BufferParams params = lv_->buffer()->params;
if (params.textclass != tc
&& AskQuestion(_("Should I set some parameters to"),
_("the defaults of this document class?"))) {
params.textclass = tc;
params.useClassDefaults();
UpdateLayoutDocument(params);
}