]> git.lyx.org Git - features.git/commitdiff
Correct the order of the tests here. Messed this up in previous commit.
authorRichard Heck <rgheck@comcast.net>
Tue, 14 Oct 2008 18:06:08 +0000 (18:06 +0000)
committerRichard Heck <rgheck@comcast.net>
Tue, 14 Oct 2008 18:06:08 +0000 (18:06 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26906 a592a061-630c-0410-9148-cb99ea01b6c8

src/frontends/qt4/GuiDocument.cpp

index 7c019ebdc25b96e2347c40c5c833cfccbaaa588f..ea7e1ae8da1167cfb889b1eb89b4b2f654d821c2 100644 (file)
@@ -1326,16 +1326,6 @@ void GuiDocument::classChanged()
                return;
        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.
        bool modulesChanged = false;
        unsigned int const srows = selectedModel()->rowCount();
@@ -1360,9 +1350,20 @@ void GuiDocument::classChanged()
                        if (ret == 0)
                                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 
        // 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,