mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-09-19 22:40:26 +00:00
Fixup f96b99dcb3
: read correctly \limits after macros
Move InsetMacro::limits_ to InsetMacro::Private, where it should have been from the start. This means that limits_ is now copied when the macro is cloned.
This commit is contained in:
parent
062d94c5da
commit
a58bcf1d27
@ -206,7 +206,7 @@ public:
|
|||||||
expanded_(buf), definition_(buf), attachedArgsNum_(0),
|
expanded_(buf), definition_(buf), attachedArgsNum_(0),
|
||||||
optionals_(0), nextFoldMode_(true), macroBackup_(buf),
|
optionals_(0), nextFoldMode_(true), macroBackup_(buf),
|
||||||
macro_(0), needsUpdate_(false), isUpdating_(false),
|
macro_(0), needsUpdate_(false), isUpdating_(false),
|
||||||
appetite_(9), nesting_(0)
|
appetite_(9), nesting_(0), limits_(AUTO_LIMITS)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
/// Update the pointers to our owner of all expanded macros.
|
/// Update the pointers to our owner of all expanded macros.
|
||||||
@ -248,6 +248,8 @@ public:
|
|||||||
size_t appetite_;
|
size_t appetite_;
|
||||||
/// Level of nesting in macros (including this one)
|
/// Level of nesting in macros (including this one)
|
||||||
int nesting_;
|
int nesting_;
|
||||||
|
///
|
||||||
|
Limits limits_;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@ -371,6 +373,7 @@ bool InsetMathMacro::addToMathRow(MathRow & mrow, MetricsInfo & mi) const
|
|||||||
return has_contents;
|
return has_contents;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/// Whether the inset allows \(no)limits
|
/// Whether the inset allows \(no)limits
|
||||||
bool InsetMathMacro::allowsLimitsChange() const
|
bool InsetMathMacro::allowsLimitsChange() const
|
||||||
{
|
{
|
||||||
@ -403,6 +406,18 @@ Limits InsetMathMacro::defaultLimits() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Limits InsetMathMacro::limits() const
|
||||||
|
{
|
||||||
|
return d->limits_;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void InsetMathMacro::limits(Limits lim)
|
||||||
|
{
|
||||||
|
d->limits_ = lim;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void InsetMathMacro::beforeMetrics() const
|
void InsetMathMacro::beforeMetrics() const
|
||||||
{
|
{
|
||||||
d->macro_->lock();
|
d->macro_->lock();
|
||||||
|
@ -47,9 +47,9 @@ public:
|
|||||||
/// The default limits value
|
/// The default limits value
|
||||||
Limits defaultLimits() const;
|
Limits defaultLimits() const;
|
||||||
/// whether the inset has limit-like sub/superscript
|
/// whether the inset has limit-like sub/superscript
|
||||||
Limits limits() const { return limits_; }
|
Limits limits() const;
|
||||||
/// sets types of sub/superscripts
|
/// sets types of sub/superscripts
|
||||||
void limits(Limits lim) { limits_ = lim; }
|
void limits(Limits lim);
|
||||||
|
|
||||||
///
|
///
|
||||||
void beforeMetrics() const;
|
void beforeMetrics() const;
|
||||||
@ -194,9 +194,6 @@ private:
|
|||||||
///
|
///
|
||||||
bool editMode(BufferView const * bv) const;
|
bool editMode(BufferView const * bv) const;
|
||||||
|
|
||||||
///
|
|
||||||
Limits limits_ = AUTO_LIMITS;
|
|
||||||
|
|
||||||
///
|
///
|
||||||
class Private;
|
class Private;
|
||||||
///
|
///
|
||||||
|
Loading…
Reference in New Issue
Block a user