Index: src/graphics/PreviewLoader.cpp
===================================================================
--- src/graphics/PreviewLoader.cpp	(revisione 37151)
+++ src/graphics/PreviewLoader.cpp	(copia locale)
@@ -207,6 +207,9 @@
 	/// to do it in the background.
 	void startLoading(bool wait = false);
 
+	/// Support function to create the single snippet preview
+	void startLoadingSnippets(bool wait, PendingSnippets snippets);
+
 	/// Emit this signal when an image is ready for display.
 	boost::signal<void(PreviewImage const &)> imageReady;
 
@@ -520,7 +523,6 @@
 	}
 }
 
-
 void PreviewLoader::Impl::startLoading(bool wait)
 {
 	if (pending_.empty() || !pconverter_)
@@ -532,6 +534,24 @@
 
 	LYXERR(Debug::GRAPHICS, "PreviewLoader::startLoading()");
 
+	// Create one snippet at a time
+	PendingSnippets singleSnippet(1, pending_.front());
+	startLoadingSnippets(wait, singleSnippet);
+	pending_.pop_front();
+}
+
+void PreviewLoader::Impl::startLoadingSnippets(bool wait, PendingSnippets snippets)
+{
+
 	// As used by the LaTeX file and by the resulting image files
 	string const directory = buffer_.temppath();
 
@@ -539,11 +559,8 @@
 
 	// Create an InProgress instance to place in the map of all
 	// such processes if it starts correctly.
-	InProgress inprogress(filename_base, pending_, pconverter_->to);
+	InProgress inprogress(filename_base, snippets, pconverter_->to);
 
-	// clear pending_, so we're ready to start afresh.
-	pending_.clear();
-
 	// Output the LaTeX file.
 	FileName const latexfile(filename_base + ".tex");
 
@@ -641,6 +658,7 @@
 
 void PreviewLoader::Impl::finishedGenerating(pid_t pid, int retval)
 {
+	startLoading(false);
 	// Paranoia check!
 	InProgressProcesses::iterator git = in_progress_.find(pid);
 	if (git == in_progress_.end()) {