mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-21 23:09:40 +00:00
Try to implement properly recursive setBuffer. Normally, implmenting
for InsetMathNest and InsetMathHull is enough. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30847 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
9833b35aa5
commit
ca7b18a5db
@ -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])
|
||||
|
@ -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();
|
||||
|
@ -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!
|
||||
|
Loading…
x
Reference in New Issue
Block a user