X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Fmathed%2FInsetMathHull.cpp;h=e21beb236e98730460d693f68c0aab4705482aaa;hb=ad79ac406f9c8fc85880cfeb5416b0299ee9a617;hp=61e02104874241536902cf1441b1e98f0d25d2c7;hpb=425c190d623daeb6d05bce1aa2244b548225305a;p=lyx.git diff --git a/src/mathed/InsetMathHull.cpp b/src/mathed/InsetMathHull.cpp index 61e0210487..e21beb236e 100644 --- a/src/mathed/InsetMathHull.cpp +++ b/src/mathed/InsetMathHull.cpp @@ -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;