+2001-07-23 Baruch Even <baruch@lyx.org>
+
+ * GraphicsCacheItem.C (convertImage): Fixed a bug with regard to loading
+ the image after conversion.
+
2001-07-17 Baruch Even <baruch@lyx.org>
* GraphicsCacheItem.h:
typedef ImageLoader::FormatList FormatList;
FormatList formats = ImageLoaderXPM().loadableFormats();
lyx::Assert(formats.size() > 0); // There must be a format to load from.
-
+
FormatList::const_iterator iter = formats.begin();
FormatList::const_iterator end = formats.end();
if (converters.IsReachable(from, *iter))
break;
}
+
if (iter == end) {
// We do not know how to convert the image to something loadable.
lyxerr << "ERROR: Do not know how to convert image." << std::endl;
// Remove the temp file, we only want the name...
lyx::unlink(tempfile);
- converters.Convert(0, filename, tempfile, from, to);
-
+ bool result = converters.Convert(0, filename, tempfile, from, to);
+ tempfile.append(".xpm");
+
// For now we are synchronous
- imageConverted(true);
+ imageConverted(result);
// Cleanup after the conversion.
lyx::unlink(tempfile);