diff --git a/src/mathed/math_macro.C b/src/mathed/math_macro.C index 988809f25f..f0a9e13c96 100644 --- a/src/mathed/math_macro.C +++ b/src/mathed/math_macro.C @@ -38,6 +38,12 @@ MathMacro::MathMacro(MathMacroTemplate const & t) {} +MathMacro::MathMacro(MathMacro const & t) + : MathInset(t), tmplate_(t.tmplate_) // don't copy 'expanded_'! +{} + + + MathInset * MathMacro::clone() const { return new MathMacro(*this); @@ -85,6 +91,8 @@ void MathMacro::draw(Painter & pain, int x, int y) xo(x); yo(y); + Metrics(size()); + LColor::color col; if (mathcursor && mathcursor->isInside(this)) { @@ -116,7 +124,8 @@ void MathMacro::draw(Painter & pain, int x, int y) col = LColor::black; } - pain.rectangle(x + 1, y - ascent() + 1, width() - 2, height() - 2, col); + if (nargs() > 0) + pain.rectangle(x + 1, y - ascent() + 1, width() - 2, height() - 2, col); } diff --git a/src/mathed/math_macro.h b/src/mathed/math_macro.h index 1e82f96125..24775e0163 100644 --- a/src/mathed/math_macro.h +++ b/src/mathed/math_macro.h @@ -39,6 +39,8 @@ public: /// A macro can be built from an existing template explicit MathMacro(MathMacroTemplate const &); /// + MathMacro(MathMacro const &); + /// void draw(Painter &, int, int); /// void Metrics(MathStyles st, int asc = 0, int des = 0); @@ -65,6 +67,8 @@ private: MathMacroTemplate const * const tmplate_; /// MathXArray expanded_; + /// + void operator=(MathMacro const &); };