Correct the order of the tests here. Messed this up in previous commit.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26906 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Richard Heck 2008-10-14 18:06:08 +00:00
parent 6a5a7d7e20
commit d4136cb652

View File

@ -1326,16 +1326,6 @@ void GuiDocument::classChanged()
return; return;
string const classname = classes_model_.getIDString(idx); string const classname = classes_model_.getIDString(idx);
// We load the TextClass as soon as it is selected. This is
// necessary so that other options in the dialog can be updated
// according to the new class. Note, however, that, if you use
// the scroll wheel when sitting on the combo box, we'll load a
// lot of TextClass objects very quickly....
if (!bp_.setBaseClass(classname)) {
Alert::error(_("Error"), _("Unable to set document class."));
return;
}
// check whether the selected modules have changed. // check whether the selected modules have changed.
bool modulesChanged = false; bool modulesChanged = false;
unsigned int const srows = selectedModel()->rowCount(); unsigned int const srows = selectedModel()->rowCount();
@ -1360,9 +1350,20 @@ void GuiDocument::classChanged()
if (ret == 0) if (ret == 0)
applyView(); applyView();
} }
if (lyxrc.auto_reset_options)
bp_.useClassDefaults();
} }
// We load the TextClass as soon as it is selected. This is
// necessary so that other options in the dialog can be updated
// according to the new class. Note, however, that, if you use
// the scroll wheel when sitting on the combo box, we'll load a
// lot of TextClass objects very quickly....
if (!bp_.setBaseClass(classname)) {
Alert::error(_("Error"), _("Unable to set document class."));
return;
}
if (lyxrc.auto_reset_options)
bp_.useClassDefaults();
// With the introduction of modules came a distinction between the base // With the introduction of modules came a distinction between the base
// class and the document class. The former corresponds to the main layout // 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, // file; the latter is that plus the modules (or the document-specific layout,