From aabd9d03bbca055c723dfc42f0fba3f705ebaa9e Mon Sep 17 00:00:00 2001 From: Enrico Forestieri Date: Sat, 5 Jul 2008 23:29:48 +0000 Subject: [PATCH] Fix bug 4992 http://bugzilla.lyx.org/show_bug.cgi?id=4992 git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25458 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/mathed/MathMacro.cpp | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/src/mathed/MathMacro.cpp b/src/mathed/MathMacro.cpp index 6089d751c2..ca3ec2298d 100644 --- a/src/mathed/MathMacro.cpp +++ b/src/mathed/MathMacro.cpp @@ -338,18 +338,14 @@ void MathMacro::draw(PainterInfo & pi, int x, int y) const int expy = y; if (displayMode_ == DISPLAY_INIT || displayMode_ == DISPLAY_INTERACTIVE_INIT) { - PainterInfo pi2(pi.base.bv, pi.pain); - pi2.base.font.setColor(Color_latex); - //pi2.base.style = LM_ST_TEXT; - pi2.pain.text(x, y, from_ascii("\\") + name(), pi2.base.font); + FontSetChanger dummy(pi.base, "lyxtex"); + pi.pain.text(x, y, from_ascii("\\") + name(), pi.base.font); } else if (displayMode_ == DISPLAY_UNFOLDED) { - PainterInfo pi2(pi.base.bv, pi.pain); - pi2.base.font.setColor(Color_latex); - //pi2.base.style = LM_ST_TEXT; - pi2.pain.text(x, y, from_ascii("\\"), pi2.base.font); - x += mathed_string_width(pi2.base.font, from_ascii("\\")) + 1; - cell(0).draw(pi2, x, y); - drawMarkers(pi2, expx, expy); + FontSetChanger dummy(pi.base, "lyxtex"); + pi.pain.text(x, y, from_ascii("\\"), pi.base.font); + x += mathed_string_width(pi.base.font, from_ascii("\\")) + 1; + cell(0).draw(pi, x, y); + drawMarkers(pi, expx, expy); } else if (lyxrc.macro_edit_style == LyXRC::MACRO_EDIT_LIST && editing_[pi.base.bv]) { // Macro will be edited in a old-style list mode here: -- 2.39.5