]> git.lyx.org Git - features.git/commitdiff
Herbert's patch to stop LyX from hanging if the graphics file does not exist.
authorAngus Leeming <leeming@lyx.org>
Mon, 25 Mar 2002 16:15:46 +0000 (16:15 +0000)
committerAngus Leeming <leeming@lyx.org>
Mon, 25 Mar 2002 16:15:46 +0000 (16:15 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@3826 a592a061-630c-0410-9148-cb99ea01b6c8

src/insets/ChangeLog
src/insets/insetgraphicsParams.C

index ef7a08ebd533fb8c9867554126b16b894cec9243..7cbf3cfad265d615dbd2abdb1979a63a30e8a4f0 100644 (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
index e4e77d960c3795040c5dc539fae71156b0612130..b1bfec7975eab4eb4c459123371b5c559aaed37c 100644 (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") {