X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Fgraphics%2FGraphicsCache.cpp;h=dbf9cafa5e93d0e14ccbefce7ab646280947cbfa;hb=4ddc9e2501400f8bdc35d4d1fe56f39c49e82115;hp=5ed905252d71343d9571aea74b975eb2c4d88e3b;hpb=d2424c699826d1e41b15a280f5e9b014173b92d4;p=lyx.git diff --git a/src/graphics/GraphicsCache.cpp b/src/graphics/GraphicsCache.cpp index 5ed905252d..dbf9cafa5e 100644 --- a/src/graphics/GraphicsCache.cpp +++ b/src/graphics/GraphicsCache.cpp @@ -44,7 +44,6 @@ public: }; -// FIXME THREAD Cache & Cache::get() { // Now return the cache @@ -72,12 +71,12 @@ vector const & Cache::loadableFormats() const return fmts; // The formats recognised by LyX - Formats::const_iterator begin = formats.begin(); - Formats::const_iterator end = formats.end(); + Formats::const_iterator begin = theFormats().begin(); + Formats::const_iterator end = theFormats().end(); // The formats natively loadable. vector nformat = frontend::loadableImageFormats(); - + vector::const_iterator it = nformat.begin(); for (; it != nformat.end(); ++it) { for (Formats::const_iterator fit = begin; fit != end; ++fit) { @@ -102,7 +101,7 @@ vector const & Cache::loadableFormats() const } -void Cache::add(FileName const & file) const +void Cache::add(FileName const & file, FileName const & doc_file) const { // Is the file in the cache already? if (inCache(file)) { @@ -111,7 +110,7 @@ void Cache::add(FileName const & file) const return; } - pimpl_->cache[file] = ItemPtr(new CacheItem(file)); + pimpl_->cache[file] = ItemPtr(new CacheItem(file, doc_file)); }