#include "BufferView.h"
#include "buffer_funcs.h"
+using std::find;
+using std::string;
+using std::vector;
+
namespace lyx {
using support::changeExtension;
using support::FileName;
using support::makeDisplayPath;
-
-using std::find;
-using std::string;
-using std::vector;
+using frontend::LyXView;
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)