]> git.lyx.org Git - lyx.git/blobdiff - src/LyX.cpp
Transfer current_font and real_current_font from Text to Cursor.
[lyx.git] / src / LyX.cpp
index 9acbceb541357f655f11792cbec5867ce2fa9558..a778d4cb819529a293fc051db037c6e6847becb2 100644 (file)
@@ -36,6 +36,7 @@
 #include "LyXFunc.h"
 #include "Lexer.h"
 #include "LyXRC.h"
+#include "ModuleList.h"
 #include "Server.h"
 #include "ServerSocket.h"
 #include "TextClassList.h"
@@ -664,7 +665,8 @@ void LyX::restoreGuiSession()
        // FIXME: Switch to the last loaded Buffer. This must not be the first one
        // because the Buffer won't be connected in this case. The correct solution
        // would be to avoid the manual connection of the current Buffer in LyXView.
-       view->setBuffer(pimpl_->buffer_list_.last());
+       if (!pimpl_->buffer_list_.empty())
+               view->setBuffer(pimpl_->buffer_list_.last());
 }
 
 
@@ -924,6 +926,8 @@ bool LyX::init()
        LYXERR(Debug::INIT) << "Reading layouts..." << endl;
        if (!LyXSetStyle())
                return false;
+       //...and the modules
+       moduleList.load();
 
        if (use_gui) {
                // Set the language defined by the user.
@@ -1113,6 +1117,7 @@ bool LyX::queryUserLyXDir(bool explicit_userdir)
                first_start = false;
 
                return needsUpdate("lyxrc.defaults")
+                       || needsUpdate("lyxmodules.lst")
                        || needsUpdate("textclass.lst")
                        || needsUpdate("packages.lst");
        }