]> git.lyx.org Git - lyx.git/commitdiff
'Fix' preview generation when the inset is locked (read: hack).
authorAngus Leeming <leeming@lyx.org>
Tue, 21 Jan 2003 17:54:03 +0000 (17:54 +0000)
committerAngus Leeming <leeming@lyx.org>
Tue, 21 Jan 2003 17:54:03 +0000 (17:54 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@5977 a592a061-630c-0410-9148-cb99ea01b6c8

src/graphics/ChangeLog
src/graphics/PreviewLoader.C

index 149786ec3dc2740dfb41034e2f5cf7db4fca3320..125a0ccfc41092eab8eccf1c339f22bf4a39969a 100644 (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
index 3568c32bbc5535c9460f3b016b5dd4c579430974..70659fb3c6cabed9d45f6c75015582d92b44b9f2 100644 (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();