]> git.lyx.org Git - features.git/commitdiff
Fixed a bug created in the code reordering.
authorBaruch Even <baruch@lyx.org>
Mon, 23 Jul 2001 16:07:29 +0000 (16:07 +0000)
committerBaruch Even <baruch@lyx.org>
Mon, 23 Jul 2001 16:07:29 +0000 (16:07 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@2311 a592a061-630c-0410-9148-cb99ea01b6c8

src/graphics/ChangeLog
src/graphics/GraphicsCacheItem.C

index 67edad92ce874f7f70195d82e6ecb00ce9fd22f2..9eedb41159bce206f9708b3cb09fa5505dbb4e91 100644 (file)
@@ -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:
index c145e8cb34477979d0457d7824ba11ffe55dc91e..a5aa650fd74b8029f6eef80a7d81e70664524fe5 100644 (file)
@@ -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);