From d51c3cd2f8c177464811e9d068576c974055515c Mon Sep 17 00:00:00 2001 From: Stefan Schimanski Date: Thu, 8 Nov 2007 10:14:18 +0000 Subject: [PATCH] * added comment to describe why we are in monochrome mode at this point. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21517 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/mathed/MathMacro.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/mathed/MathMacro.cpp b/src/mathed/MathMacro.cpp index 862afe3a0e..cf7f58401f 100644 --- a/src/mathed/MathMacro.cpp +++ b/src/mathed/MathMacro.cpp @@ -59,9 +59,16 @@ public: /// void draw(PainterInfo & pi, int x, int y) const { if (mathMacro_.editing()) { + // The only way a ArgumentProxy can appear is in a cell of the + // MathMacro. Moreover the cells are only drawn in the DISPLAY_FOLDED + // mode and then, in the case of "editing_ == true" the monochrome + // mode is entered by the MathMacro before calling the cells' draw + // method. Then eventually this code is reached and the proxy leaves + // monochrome mode temporarely. Hence, if it is not in monochrome + // here (and the assert triggers in pain.leaveMonochromeMode()) + // it's a bug. pi.pain.leaveMonochromeMode(); mathMacro_.cell(idx_).draw(pi, x, y); - // FIXME: use real min/max colors here, not necessarely the ones of MathMacro are set pi.pain.enterMonochromeMode(Color_mathbg, Color_mathmacroblend); } else { if (def_.empty())