commit 7da981b322aa2e24ecc7a4c9fd24d7fb0eba5181
Author: Enrico Forestieri <[email protected]>
Date: Sun Mar 22 22:13:55 2015 +0100
Fix crash related to the icon info inset.
When closing a document with the cursor near an icon info inset, LyX
may crash on loading again the same document. This is most probably due
to the fact that compressed svg icons are first uncompressed to a
temporary file before being used. The temporary file is then deleted
but something still expects to find it in place. The exact circumstances
that lead to the crash are unknown, and maybe there is also a race entering
the picture here. However, a document that always leads to a crash can be
found attached here: http://article.gmane.org/gmane.editors.lyx.devel/154566
This commit does not fix the cause of the crash but rather avoids it.
As a bonus, the svg icons used by LyX are not uncompressed anymore before
being used, speeding up startup time. This is not a problem, because Qt
can deal with compressed svg images.
diff --git a/lib/configure.py b/lib/configure.py
index df19e80..0b06cde 100644
--- a/lib/configure.py
+++ b/lib/configure.py
@@ -582,7 +582,7 @@ def checkFormatEntries(dtl_tools):
rc_entry = [r'\Format fen fen FEN ""
"%%" "%%" "" ""'])
#
checkViewerEditor('a SVG viewer and editor', ['inkscape'],
- rc_entry = [r'\Format svg svg SVG ""
"%%" "%%" "vector" "image/svg+xml"'])
+ rc_entry = [r'\Format svg "svg, svgz" SVG ""
"%%" "%%" "vector,zipped=native" "image/svg+xml"'])
#
imageformats = r'''\Format bmp bmp BMP ""
"%s" "%s" "" "image/x-bmp"
\Format gif gif GIF "" "%s" "%s" ""
"image/gif"