]> git.lyx.org Git - lyx.git/blobdiff - src/bufferlist.C
forgot these
[lyx.git] / src / bufferlist.C
index 86c632cee3cc5209f6cf172ecb6594d2a2394867..894f069449588ce2dca23c20a5c0fb7a3ec8f5df 100644 (file)
@@ -20,7 +20,6 @@
 
 #include "bufferlist.h"
 #include "lyx_main.h"
-#include "lyx_gui_misc.h"
 #include "lastfiles.h"
 #include "debug.h"
 #include "lyxrc.h"
@@ -32,6 +31,7 @@
 #include "LyXView.h"
 #include "vc-backend.h"
 #include "TextCache.h"
+#include "lyxtextclasslist.h"
 
 #include "frontends/Alert.h"
 
@@ -480,9 +480,11 @@ Buffer * BufferList::newFile(string const & name, string tname, bool isNamed)
                                   MakeDisplayPath(tname));
                        // no template, start with empty buffer
                        b->paragraph = new Paragraph;
+                       b->paragraph->layout(textclasslist[b->params.textclass].defaultLayoutName());
                }
        } else {  // start with empty buffer
                b->paragraph = new Paragraph;
+                       b->paragraph->layout(textclasslist[b->params.textclass].defaultLayoutName());
        }
 
        if (!lyxrc.new_ask_filename && !isNamed) {