Fixes a bug introduced in r32157 while fixing bug #4360.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32352
a592a061-630c-0410-9148-
cb99ea01b6c8
graphics::PreviewLoader & /*ploader*/) const
{
if (RenderPreview::status() == LyXRC::PREVIEW_ON) {
graphics::PreviewLoader & /*ploader*/) const
{
if (RenderPreview::status() == LyXRC::PREVIEW_ON) {
- reloadPreview(inset_pos);
+ preparePreview(inset_pos);
-void InsetMathHull::reloadPreview(DocIterator const & pos) const
-{
+void InsetMathHull::preparePreview(DocIterator const & pos) const
+{
Buffer const * buffer = pos.buffer();
// collect macros at this position
Buffer const * buffer = pos.buffer();
// collect macros at this position
docstring const snippet = macro_preamble.str() + latexString(*this);
LYXERR(Debug::MACROS, "Preview snippet: " << snippet);
preview_->addPreview(snippet, *buffer);
docstring const snippet = macro_preamble.str() + latexString(*this);
LYXERR(Debug::MACROS, "Preview snippet: " << snippet);
preview_->addPreview(snippet, *buffer);
- preview_->startLoading(*buffer);
}
bool InsetMathHull::notifyCursorLeaves(Cursor const & old, Cursor & cur)
{
if (RenderPreview::status() == LyXRC::PREVIEW_ON) {
}
bool InsetMathHull::notifyCursorLeaves(Cursor const & old, Cursor & cur)
{
if (RenderPreview::status() == LyXRC::PREVIEW_ON) {
+ preparePreview(old);
+ preview_->startLoading(buffer());
cur.updateFlags(Update::Force);
}
return false;
cur.updateFlags(Update::Force);
}
return false;
///
void addPreview(DocIterator const & inset_pos,
graphics::PreviewLoader &) const;
///
void addPreview(DocIterator const & inset_pos,
graphics::PreviewLoader &) const;
- /// Recreate the preview if preview is enabled.
- void reloadPreview(DocIterator const & pos) const;
+ /// Prepare the preview if preview is enabled. A subsequent
+ /// call to reloadPreview will recreate the preview.
+ void preparePreview(DocIterator const & pos) const;
///
void initUnicodeMath() const;
///
void initUnicodeMath() const;