Herbert's patch to stop LyX from hanging if the graphics file does not exist.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@3826 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Angus Leeming 2002-03-25 16:15:46 +00:00
parent 3d36ec3299
commit ab53dc5d7b
2 changed files with 10 additions and 2 deletions

View File

@ -1,3 +1,8 @@
2002-03-25 Herbert Voss <voss@lyx.org>
* insetgraphicsParams.C (Read): prevent LyX from hanging if the
graphics file does not exist.
2002-03-25 Angus Leeming <a.leeming@ic.ac.uk>
* insetgraphics.C (prepareFile): ensure that the file has an absolute

View File

@ -251,8 +251,11 @@ bool InsetGraphicsParams::Read(LyXLex & lex, string const& token)
draft = true;
} else if (token == "display") {
lex.next();
string const type = lex.getString();
display = displayTranslator.find(type);
if (IsFileReadable(filename)) {
string const type = lex.getString();
display = displayTranslator.find(type);
} else
display = NONE;
} else if (token == "subcaption") {
subcaption = true;
} else if (token == "subcaptionText") {