Fix trunk after r32352.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32353 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Vincent van Ravesteijn 2009-12-05 01:07:38 +00:00
parent b56e4c5697
commit 80ac638d42
2 changed files with 13 additions and 5 deletions

View File

@ -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;

View File

@ -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;