From 80ac638d4250161e27bd558317a764894cfcf813 Mon Sep 17 00:00:00 2001 From: Vincent van Ravesteijn Date: Sat, 5 Dec 2009 01:07:38 +0000 Subject: [PATCH] Fix trunk after r32352. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32353 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/mathed/InsetMathHull.cpp | 13 ++++++++++--- src/mathed/InsetMathHull.h | 5 +++-- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/src/mathed/InsetMathHull.cpp b/src/mathed/InsetMathHull.cpp index 657c593094..4512e9cb03 100644 --- a/src/mathed/InsetMathHull.cpp +++ b/src/mathed/InsetMathHull.cpp @@ -487,13 +487,20 @@ void InsetMathHull::preparePreview(DocIterator const & pos) const docstring const snippet = macro_preamble.str() + latexString(*this); LYXERR(Debug::MACROS, "Preview snippet: " << snippet); preview_->addPreview(snippet, *buffer); -} +} + + +void InsetMathHull::reloadPreview(DocIterator const & pos) const +{ + preparePreview(pos); + preview_->startLoading(*pos.buffer()); +} + bool InsetMathHull::notifyCursorLeaves(Cursor const & old, Cursor & cur) { if (RenderPreview::status() == LyXRC::PREVIEW_ON) { - preparePreview(old); - preview_->startLoading(buffer()); + reloadPreview(old); cur.updateFlags(Update::Force); } return false; diff --git a/src/mathed/InsetMathHull.h b/src/mathed/InsetMathHull.h index 7b2b48ba79..be67b702c3 100644 --- a/src/mathed/InsetMathHull.h +++ b/src/mathed/InsetMathHull.h @@ -134,9 +134,10 @@ public: /// void addPreview(DocIterator const & inset_pos, graphics::PreviewLoader &) const; - /// Prepare the preview if preview is enabled. A subsequent - /// call to reloadPreview will recreate the preview. + /// Prepare the preview if preview is enabled. void preparePreview(DocIterator const & pos) const; + /// Recreates the preview if preview is enabled. + void reloadPreview(DocIterator const & pos) const; /// void initUnicodeMath() const;