]> git.lyx.org Git - lyx.git/blobdiff - src/Importer.cpp
Fulfill promise to Andre: TextClass_ptr --> TextClassPtr.
[lyx.git] / src / Importer.cpp
index 78c2c0969eec5c8e117c38006352a08629f28d87..6f38b202987af9269a36e0e1e09592ee81100de8 100644 (file)
@@ -38,6 +38,7 @@ using support::bformat;
 using support::changeExtension;
 using support::FileName;
 using support::makeDisplayPath;
+using frontend::LyXView;
 
 
 bool Importer::Import(LyXView * lv, FileName const & filename,
@@ -76,7 +77,15 @@ bool Importer::Import(LyXView * lv, FileName const & filename,
 
 
        if (loader_format == "lyx") {
-               lv->loadLyXFile(lyxfile);
+               Buffer * buf = lv->loadLyXFile(lyxfile);
+               if (!buf) {
+                       // we are done
+                       lv->message(_("file not imported!"));
+                       return false;
+               }
+               updateLabels(*buf);
+               lv->setBuffer(buf);
+               lv->showErrorList("Parse");
        } else {
                Buffer * const b = newFile(lyxfile.absFilename(), string(), true);
                if (b)