'Fix' preview generation when the inset is locked (read: hack).

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@5977 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Angus Leeming 2003-01-21 17:54:03 +00:00
parent 2fb92b0cef
commit 534c2aa641
2 changed files with 18 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2003-01-21 Angus Leeming <leeming@lyx.org>
* PreviewLoader.C (dumpPreamble): ensure that \lyxlock does not prevent
previews from being generated.
2003-01-13 Angus Leeming <leeming@lyx.org>
* GraphicsCacheItem.C (findTargetFormat): define the default conversion

View File

@ -562,6 +562,19 @@ void PreviewLoader::Impl::dumpPreamble(ostream & os) const
// Dump the preamble only.
tmp.makeLaTeXFile(os, buffer_.filePath(), true, false, true);
// FIXME! This is a HACK! The proper fix is to control the 'true'
// passed to WriteStream below:
// int InsetFormula::latex(Buffer const *, ostream & os,
// bool fragile, bool) const
// {
// WriteStream wi(os, fragile, true);
// par_->write(wi);
// return wi.line();
// }
os << "\n"
<< "\\def\\lyxlock{}\n"
<< "\n";
// Loop over the insets in the buffer and dump all the math-macros.
Buffer::inset_iterator it = buffer_.inset_const_iterator_begin();
Buffer::inset_iterator end = buffer_.inset_const_iterator_end();