mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 05:16:21 +00:00
Fixed a bug created in the code reordering.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@2311 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
86ea4e48e7
commit
0901dfd71f
@ -1,3 +1,8 @@
|
||||
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:
|
||||
|
@ -97,7 +97,7 @@ string const findTargetFormat(string const & from)
|
||||
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();
|
||||
|
||||
@ -105,6 +105,7 @@ string const findTargetFormat(string const & from)
|
||||
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;
|
||||
@ -143,10 +144,11 @@ GraphicsCacheItem::convertImage(string const & filename)
|
||||
// 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);
|
||||
|
Loading…
Reference in New Issue
Block a user