]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/InsetMathHull.cpp
Fixup 89662a68: remove markers that should not be there
[lyx.git] / src / mathed / InsetMathHull.cpp
index 61e02104874241536902cf1441b1e98f0d25d2c7..e21beb236e98730460d693f68c0aab4705482aaa 100644 (file)
@@ -335,7 +335,7 @@ void InsetMathHull::updateBuffer(ParIterator const & it, UpdateType utype)
 
 
 void InsetMathHull::addToToc(DocIterator const & pit, bool output_active,
-                                                        UpdateType utype) const
+                                                        UpdateType utype, TocBackend & backend) const
 {
        if (!buffer_) {
                //FIXME: buffer_ should be set at creation for this inset! Problem is
@@ -344,7 +344,7 @@ void InsetMathHull::addToToc(DocIterator const & pit, bool output_active,
                return;
        }
 
-       TocBuilder & b = buffer().tocBackend().builder("equation");
+       TocBuilder & b = backend.builder("equation");
        // compute first and last item
        row_type first = nrows();
        for (row_type row = 0; row != nrows(); ++row)
@@ -368,7 +368,7 @@ void InsetMathHull::addToToc(DocIterator const & pit, bool output_active,
                if (!numbered(row))
                        continue;
                if (label_[row])
-                       label_[row]->addToToc(pit, output_active, utype);
+                       label_[row]->addToToc(pit, output_active, utype, backend);
                docstring label = nicelabel(row);
                if (first == last)
                        // this is the only equation
@@ -567,8 +567,9 @@ void InsetMathHull::metrics(MetricsInfo & mi, Dimension & dim) const
                        dim.wid += 30 + l;
        }
 
-       if (type_ == hullRegexp)
-               dim.wid += 2;
+       // reserve some space for marker.
+       dim.wid += 2;
+
        // make it at least as high as the current font
        int asc = 0;
        int des = 0;
@@ -644,6 +645,7 @@ void InsetMathHull::draw(PainterInfo & pi, int x, int y) const
                                                            : LM_ST_TEXT);
 
        InsetMathGrid::draw(pi, x + 1, y);
+       drawMarkers2(pi, x, y);
 
        if (numberedType()) {
                int const xx = x + colinfo_.back().offset_ + colinfo_.back().width_ + 20;