diff --git a/src/mathed/InsetMathHull.cpp b/src/mathed/InsetMathHull.cpp index be89a71a67..f632b80288 100644 --- a/src/mathed/InsetMathHull.cpp +++ b/src/mathed/InsetMathHull.cpp @@ -211,12 +211,7 @@ InsetMathHull & InsetMathHull::operator=(InsetMathHull const & other) void InsetMathHull::setBuffer(Buffer & buffer) { - buffer_ = &buffer; - for (idx_type i = 0, n = nargs(); i != n; ++i) { - MathData & data = cell(i); - for (size_t j = 0; j != data.size(); ++j) - data[j].nucleus()->setBuffer(buffer); - } + InsetMathGrid::setBuffer(buffer); for (size_t i = 0; i != label_.size(); ++i) { if (label_[i]) diff --git a/src/mathed/InsetMathNest.cpp b/src/mathed/InsetMathNest.cpp index 99bfc5f46a..484418ea4a 100644 --- a/src/mathed/InsetMathNest.cpp +++ b/src/mathed/InsetMathNest.cpp @@ -100,6 +100,17 @@ InsetMathNest & InsetMathNest::operator=(InsetMathNest const & inset) } +void InsetMathNest::setBuffer(Buffer & buffer) +{ + InsetMath::setBuffer(buffer); + for (idx_type i = 0, n = nargs(); i != n; ++i) { + MathData & data = cell(i); + for (size_t j = 0; j != data.size(); ++j) + data[j].nucleus()->setBuffer(buffer); + } +} + + InsetMath::idx_type InsetMathNest::nargs() const { return cells_.size(); diff --git a/src/mathed/InsetMathNest.h b/src/mathed/InsetMathNest.h index 7b320e61c3..2607f5bbbb 100644 --- a/src/mathed/InsetMathNest.h +++ b/src/mathed/InsetMathNest.h @@ -30,6 +30,8 @@ public: explicit InsetMathNest(idx_type ncells); /// virtual ~InsetMathNest() {} + /// + void setBuffer(Buffer &); /// the size is usually some sort of convex hull of the cells /// hides inset::metrics() intentionally!