]> git.lyx.org Git - lyx.git/blobdiff - src/graphics/GraphicsLoader.cpp
GuiTabular.cpp: don't hardcode decimal align combobox item
[lyx.git] / src / graphics / GraphicsLoader.cpp
index 559c3a7af9c353782933ca07bc5fa7a543c94b38..36f2839446bbd12f5e0e4cc4b9cf9860f217e438 100644 (file)
@@ -96,7 +96,7 @@ void LoaderQueue::loadNext()
                if (ptr->status() == WaitingToLoad)
                        ptr->startLoading();
        }
-       if (cache_queue_.size()) {
+       if (!cache_queue_.empty()) {
                startLoader();
        } else {
                stopLoader();
@@ -159,7 +159,7 @@ void LoaderQueue::touch(Cache::ItemPtr const & item)
 //
 /////////////////////////////////////////////////////////////////////
 
-typedef boost::shared_ptr<Image> ImagePtr;
+typedef shared_ptr<Image> ImagePtr;
 
 class Loader::Impl : public boost::signals::trackable {
 public:
@@ -368,7 +368,11 @@ void Loader::Impl::resetFile(FileName const & file)
                // signal needs to be disconnected.
                sc_.disconnect();
                cached_item_.reset();
-               Cache::get().remove(old_file);
+               if (status_ != Converting) {
+                       Cache::get().remove(old_file);
+               } else {
+                       //TODO remove cache item when it is not busy any more, see #7163
+               }
        }
 
        status_ = cached_item_.get() ? cached_item_->status() : WaitingToLoad;