commit b8c08914276b8b7803bf0fdc8ce75fa8ed15eda9
Author: Jean-Marc Lasgouttes <[email protected]>
Date:   Fri Feb 24 23:25:40 2017 +0100

    Remove optimization that avoids drawing some math inset cells.
    
    It is not clear that the optimization is a gain, but it is clear that
    it has a cost: some elements of formulas will not be present in the
    position cache.
    
    Fixes bug #10520.
---
 src/mathed/MathData.cpp |   12 +-----------
 1 files changed, 1 insertions(+), 11 deletions(-)

diff --git a/src/mathed/MathData.cpp b/src/mathed/MathData.cpp
index 8ff9461..60ef524 100644
--- a/src/mathed/MathData.cpp
+++ b/src/mathed/MathData.cpp
@@ -323,17 +323,7 @@ void MathData::drawSelection(PainterInfo & pi, int const 
x, int const y) const
 void MathData::draw(PainterInfo & pi, int const x, int const y) const
 {
        //lyxerr << "MathData::draw: x: " << x << " y: " << y << endl;
-       BufferView & bv  = *pi.base.bv;
-       setXY(bv, x, y);
-
-       Dimension const & dim = bv.coordCache().getArrays().dim(this);
-
-       // don't draw outside the workarea
-       if (y + dim.descent() <= 0
-               || y - dim.ascent() >= bv.workHeight()
-               || x + dim.width() <= 0
-               || x >= bv. workWidth())
-               return;
+       setXY(*pi.base.bv, x, y);
 
        drawSelection(pi, x, y);
        MathRow const & mrow = mrow_cache_[pi.base.bv];

Reply via email to