]> git.lyx.org Git - features.git/commitdiff
Remove workaround due to nested math hulls. See:
authorEnrico Forestieri <forenr@lyx.org>
Sat, 9 May 2009 21:16:04 +0000 (21:16 +0000)
committerEnrico Forestieri <forenr@lyx.org>
Sat, 9 May 2009 21:16:04 +0000 (21:16 +0000)
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

src/mathed/InsetMathHull.cpp

index 15096fb9918f7426764708908ec01a8ee8279b84..3ba161071f64de38c45de6fc67c82062cd98ce9d 100644 (file)
@@ -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();