From: Enrico Forestieri Date: Sat, 9 May 2009 21:16:04 +0000 (+0000) Subject: Remove workaround due to nested math hulls. See: X-Git-Tag: 2.0.0~6624 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=024378db01eb0242b447838cf74f5460b6b8cdf1;p=features.git Remove workaround due to nested math hulls. See: http://thread.gmane.org/gmane.editors.lyx.devel/110190/focus=110242 git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@29600 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/mathed/InsetMathHull.cpp b/src/mathed/InsetMathHull.cpp index 15096fb991..3ba161071f 100644 --- a/src/mathed/InsetMathHull.cpp +++ b/src/mathed/InsetMathHull.cpp @@ -449,15 +449,7 @@ void InsetMathHull::drawT(TextPainter & pain, int x, int y) const static docstring latexString(InsetMathHull const & inset) { odocstringstream ls; - // This has to be static, because a preview snippet containing math - // in text mode (such as $\text{$\phi$}$) gets processed twice. The - // first time as a whole, and the second time only the inner math. - // In this last case inset.buffer() would be invalid. - // FIXME: preview snippets should only be processed once, such that - // both static qualifier and isBufferValid() check can be dropped. - static Encoding const * encoding = 0; - if (inset.isBufferValid()) - encoding = &(inset.buffer().params().encoding()); + Encoding const * encoding = &(inset.buffer().params().encoding()); WriteStream wi(ls, false, true, false, encoding); inset.write(wi); return ls.str();