mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 13:18:28 +00:00
Use math class information from lib/symbols for intelligent splitting
This was missing for macros defined in lib/symbols. This only affects the equation splitting since global macros are always linearized. This fixes #10107.
This commit is contained in:
parent
3e79e0f5f0
commit
087f72202e
@ -821,6 +821,21 @@ size_t MathMacro::appetite() const
|
||||
}
|
||||
|
||||
|
||||
MathClass MathMacro::mathClass() const
|
||||
{
|
||||
// this only affects intelligent splitting since global macros are always
|
||||
// linearised.
|
||||
if (MacroData const * m = macroBackup()) {
|
||||
if (m->symbol()) {
|
||||
MathClass mc = string_to_class(d->macroBackup_.symbol()->extra);
|
||||
if (mc != MC_UNKNOWN)
|
||||
return mc;
|
||||
}
|
||||
}
|
||||
return MC_ORD;
|
||||
}
|
||||
|
||||
|
||||
InsetMath::mode_type MathMacro::currentMode() const
|
||||
{
|
||||
// There is no way to guess the mode of user defined macros, so they are
|
||||
|
@ -141,6 +141,9 @@ public:
|
||||
size_t appetite() const;
|
||||
///
|
||||
InsetCode lyxCode() const { return MATH_MACRO_CODE; }
|
||||
/// This is not used for display; however whether it is mathrel determines
|
||||
/// how to split equations intelligently.
|
||||
MathClass mathClass() const; //override
|
||||
|
||||
protected:
|
||||
friend class MathData;
|
||||
|
Loading…
Reference in New Issue
Block a user