diff --git a/src/mathed/formula.C b/src/mathed/formula.C index 492b3d355a..ce31858fa8 100644 --- a/src/mathed/formula.C +++ b/src/mathed/formula.C @@ -163,6 +163,8 @@ void InsetFormula::draw(BufferView * bv, LyXFont const & font, par_->draw(pain, x, y); xx += par_->width(); + xo_ = x; + yo_ = y; setCursorVisible(false); } @@ -365,11 +367,17 @@ void InsetFormula::handleExtern(const string & arg) if (!mathcursor) return; + bool selected = mathcursor->selection(); + MathArray ar; - if (mathcursor->selection()) + if (selected) { mathcursor->selGet(ar); - else + lyxerr << "use selection: " << ar << "\n"; + } else { ar = mathcursor->cursor().cell(); + lyxerr << "use whole cell: " << ar << "\n"; + } + // parse args string lang; @@ -392,15 +400,14 @@ void InsetFormula::handleExtern(const string & arg) string code = os.str().c_str(); // run external sript - string script = "lyx2" + arg + " '" + code + "' " + outfile; + string script = "lyx2" + lang + " '" + code + "' " + outfile; lyxerr << "calling: " << script << endl; Systemcalls cmd(Systemcalls::System, script, 0); - // append a '=' - //ar.push_back(MathAtom(new MathCharInset('='))); - // append result MathArray br; + if (selected) + br.push_back(MathAtom(new MathCharInset('=', LM_TC_VAR))); ifstream is(outfile.c_str()); mathed_parse_cell(br, is); mathcursor->insert(br); diff --git a/src/mathed/formulabase.C b/src/mathed/formulabase.C index f355b6fd5f..aa7e612105 100644 --- a/src/mathed/formulabase.C +++ b/src/mathed/formulabase.C @@ -103,7 +103,7 @@ MathArrayInset * matrixpar(MathInset::idx_type & idx) InsetFormulaBase::InsetFormulaBase() - : view_(0), font_() + : view_(0), font_(), xo_(0), yo_(0) { // This is needed as long the math parser is not re-entrant MathMacroTable::builtinMacros(); @@ -172,9 +172,9 @@ void InsetFormulaBase::insetUnlock(BufferView * bv) void InsetFormulaBase::getCursorPos(BufferView *, int & x, int & y) const { mathcursor->getPos(x, y); - x -= par()->xo(); - y -= par()->yo(); - y -= 3; + x += xo_; + y += yo_ - 3; + //lyxerr << "getCursorPos: " << x << " " << y << "\n"; } @@ -189,14 +189,14 @@ void InsetFormulaBase::toggleInsetCursor(BufferView * bv) int x; int y; mathcursor->getPos(x, y); - //x -= par()->xo(); - y -= par()->yo(); y -= 3; + y -= yo_; int asc = 0; int des = 0; MathMetricsInfo mi(bv, font_, LM_ST_TEXT); math_font_max_dim(LM_TC_TEXTRM, mi, asc, des); bv->showLockedInsetCursor(x, y, asc, des); + //lyxerr << "toggleInsetCursor: " << x << " " << y << "\n"; } toggleCursorVisible(); @@ -210,13 +210,12 @@ void InsetFormulaBase::showInsetCursor(BufferView * bv, bool) int x; int y; mathcursor->getPos(x, y); - x -= par()->xo(); - y -= par()->yo(); int asc = 0; int des = 0; MathMetricsInfo mi(bv, font_, LM_ST_TEXT); math_font_max_dim(LM_TC_TEXTRM, mi, asc, des); bv->fitLockedInsetCursor(x, y, asc, des); + //lyxerr << "showInsetCursor: " << x << " " << y << "\n"; } toggleInsetCursor(bv); } @@ -255,9 +254,8 @@ void InsetFormulaBase::insetButtonRelease(BufferView * bv, { if (mathcursor) { hideInsetCursor(bv); - x += par()->xo(); - y += par()->yo(); - mathcursor->setPos(x, y); + mathcursor->setPos(x + xo_, y + yo_); + //lyxerr << "insetButtonRelease: " << x + xo_ << " " << y + yo_ << "\n"; showInsetCursor(bv); if (sel_flag) { sel_flag = false; @@ -288,14 +286,12 @@ void InsetFormulaBase::insetMotionNotify(BufferView * bv, if (sel_x && sel_y && abs(x-sel_x) > 4 && !sel_flag) { sel_flag = true; hideInsetCursor(bv); - mathcursor->setPos(sel_x + par()->xo(), sel_y + par()->yo()); + mathcursor->setPos(sel_x, sel_y); mathcursor->selStart(); showInsetCursor(bv); mathcursor->getPos(sel_x, sel_y); } else if (sel_flag) { hideInsetCursor(bv); - x += par()->xo(); - y += par()->yo(); mathcursor->setPos(x, y); showInsetCursor(bv); mathcursor->getPos(x, y); @@ -429,14 +425,11 @@ InsetFormulaBase::localDispatch(BufferView * bv, kb_action action, // break; case LFUN_SETXY: { lyxerr << "LFUN_SETXY broken!\n"; - int x; - int y; - int x1; - int y1; + int x = 0; + int y = 0; istringstream is(arg.c_str()); is >> x >> y; - par()->getXY(x1, y1); - mathcursor->setPos(x1 + x, y1 + y); + mathcursor->setPos(x, y); updateLocal(bv, false); break; } @@ -683,6 +676,21 @@ Inset::Code InsetFormulaBase::lyxCode() const } +int InsetFormulaBase::upperY() const +{ + return yo_ - ascent(view_, font_); +} + + +int InsetFormulaBase::lowerY() const +{ + return yo_ + descent(view_, font_); +} + + +///////////////////////////////////////////////////////////////////// + + void mathDispatchCreation(BufferView * bv, string const & arg, bool display) { if (bv->available()) { @@ -795,3 +803,4 @@ void mathDispatchGreek(BufferView * bv, string const & arg) } } + diff --git a/src/mathed/formulabase.h b/src/mathed/formulabase.h index 4d33c9700b..8f5c30f94b 100644 --- a/src/mathed/formulabase.h +++ b/src/mathed/formulabase.h @@ -45,6 +45,10 @@ public: virtual void draw(BufferView *,LyXFont const &, int, float &, bool) const = 0; /// virtual MathInsetTypes getType() const = 0; + /// upper y coordinate + virtual int upperY() const; + /// lower y coordinate + virtual int lowerY() const; public: /// @@ -93,6 +97,10 @@ public: virtual void metrics(BufferView * bv = 0, LyXFont const & font = LyXFont()) const; /// virtual void updateLocal(BufferView * bv, bool mark_dirty); + /// + int xo() const { return xo_; } + /// + int yo() const { return yo_; } private: /// unimplemented void operator=(const InsetFormulaBase &); @@ -100,6 +108,11 @@ private: mutable BufferView * view_; /// mutable LyXFont font_; +protected: + /// + mutable int xo_; + /// + mutable int yo_; }; // We don't really mess want around with mathed stuff outside mathed. diff --git a/src/mathed/formulamacro.C b/src/mathed/formulamacro.C index 587155747e..e2e28577b3 100644 --- a/src/mathed/formulamacro.C +++ b/src/mathed/formulamacro.C @@ -115,7 +115,7 @@ void InsetFormulaMacro::read(Buffer const *, LyXLex & lex) { string name = mathed_parse_macro(lex); setInsetName(name); - lyxerr << "metrics disabled"; + //lyxerr << "metrics disabled"; metrics(); } @@ -202,7 +202,7 @@ MathInsetTypes InsetFormulaMacro::getType() const void InsetFormulaMacro::draw(BufferView * bv, LyXFont const & f, - int baseline, float & x, bool /*cleared*/) const + int y, float & x, bool /*cleared*/) const { Painter & pain = bv->painter(); LyXFont font(f); @@ -210,24 +210,23 @@ void InsetFormulaMacro::draw(BufferView * bv, LyXFont const & f, // label font.setColor(LColor::math); - int const y = baseline - ascent(bv, font) + 1; + int const a = y - ascent(bv, font) + 1; int const w = width(bv, font) - 2; int const h = ascent(bv, font) + descent(bv, font) - 2; // LColor::mathbg used to be "AntiqueWhite" but is "linen" now, too - pain.fillRectangle(int(x), y , w, h, LColor::mathmacrobg); - pain.rectangle(int(x), y, w, h, LColor::mathframe); + pain.fillRectangle(int(x), a , w, h, LColor::mathmacrobg); + pain.rectangle(int(x), a, w, h, LColor::mathframe); if (mathcursor && mathcursor->formula() == this) mathcursor->drawSelection(pain); - pain.text(int(x + 2), baseline, prefix(), font); + pain.text(int(x + 2), y, prefix(), font); x += width(bv, font); // formula - float t = par()->width() + 5; - x -= t; - par()->draw(pain, int(x), baseline); - x += t; + xo_ = int(x) - par()->width() - 5; + yo_ = y; + par()->draw(pain, xo_, yo_); } diff --git a/src/mathed/math_binominset.C b/src/mathed/math_binominset.C index 7ffbd19fee..85e9de308b 100644 --- a/src/mathed/math_binominset.C +++ b/src/mathed/math_binominset.C @@ -42,8 +42,6 @@ void MathBinomInset::metrics(MathMetricsInfo const & st) const void MathBinomInset::draw(Painter & pain, int x, int y) const { - xo(x); - yo(y); int m = x + width() / 2; xcell(0).draw(pain, m - xcell(0).width() / 2, y - xcell(0).descent() - 3 - 5); xcell(1).draw(pain, m - xcell(1).width() / 2, y + xcell(1).ascent() + 3 - 5); diff --git a/src/mathed/math_charinset.C b/src/mathed/math_charinset.C index 3d1557c402..8b0a570184 100644 --- a/src/mathed/math_charinset.C +++ b/src/mathed/math_charinset.C @@ -84,8 +84,6 @@ void MathCharInset::metrics(MathMetricsInfo const & mi) const void MathCharInset::draw(Painter & pain, int x, int y) const { - xo(x); - yo(y); //lyxerr << "drawing '" << char_ << "' code: " << code_ << endl; drawChar(pain, code_, mi_, x, y, char_); } diff --git a/src/mathed/math_cursor.C b/src/mathed/math_cursor.C index 019e9fb140..2bcfb6bb59 100644 --- a/src/mathed/math_cursor.C +++ b/src/mathed/math_cursor.C @@ -750,7 +750,7 @@ void MathCursor::selClear() void MathCursor::selGet(MathArray & ar) { seldump("selGet"); - if (selection_) + if (!selection_) return; theSelection.grab(*this); @@ -1179,9 +1179,8 @@ bool MathCursor::goUp() int y0; getPos(x0, y0); std::vector save = Cursor_; - MathAtom const & out = formula()->par(); y0 -= xarray().ascent(); - for (int y = y0 - 4; y > out->yo() - out->ascent(); y -= 4) { + for (int y = y0 - 4; y > formula()->upperY(); y -= 4) { setPos(x0, y); if (save != Cursor_ && xarray().yo() < y0) return true; @@ -1212,9 +1211,8 @@ bool MathCursor::goDown() int y0; getPos(x0, y0); std::vector save = Cursor_; - MathAtom const & out = formula()->par(); y0 += xarray().descent(); - for (int y = y0 + 4; y < out->yo() + out->descent(); y += 4) { + for (int y = y0 + 4; y < formula()->lowerY(); y += 4) { setPos(x0, y); if (save != Cursor_ && xarray().yo() > y0) return true; diff --git a/src/mathed/math_decorationinset.C b/src/mathed/math_decorationinset.C index 35a2515d6b..7c76cee6eb 100644 --- a/src/mathed/math_decorationinset.C +++ b/src/mathed/math_decorationinset.C @@ -84,8 +84,6 @@ void MathDecorationInset::metrics(MathMetricsInfo const & st) const void MathDecorationInset::draw(Painter & pain, int x, int y) const { - xo(x); - yo(x); xcell(0).draw(pain, x, y); if (wide()) mathed_draw_deco(pain, x, y + dy_, width_, dh_, name_); diff --git a/src/mathed/math_deliminset.C b/src/mathed/math_deliminset.C index 40f548695c..ed1b0ea573 100644 --- a/src/mathed/math_deliminset.C +++ b/src/mathed/math_deliminset.C @@ -76,9 +76,6 @@ void MathDelimInset::metrics(MathMetricsInfo const & mi) const void MathDelimInset::draw(Painter & pain, int x, int y) const { - xo(x); - yo(y); - int const w = dw(); int const b = y - ascent_; xcell(0).draw(pain, x + w + 2, y); diff --git a/src/mathed/math_fracinset.C b/src/mathed/math_fracinset.C index 4a4cd0ef64..0dcf7a8014 100644 --- a/src/mathed/math_fracinset.C +++ b/src/mathed/math_fracinset.C @@ -33,8 +33,6 @@ void MathFracInset::metrics(MathMetricsInfo const & mi) const void MathFracInset::draw(Painter & pain, int x, int y) const { - xo(x); - yo(y); int m = x + width() / 2; xcell(0).draw(pain, m - xcell(0).width() / 2, y - xcell(0).descent() - 3 - 5); xcell(1).draw(pain, m - xcell(1).width() / 2, y + xcell(1).ascent() + 3 - 5); diff --git a/src/mathed/math_funcinset.C b/src/mathed/math_funcinset.C index 765aa191b9..f53f513edd 100644 --- a/src/mathed/math_funcinset.C +++ b/src/mathed/math_funcinset.C @@ -58,7 +58,5 @@ void MathFuncInset::metrics(MathMetricsInfo const & mi) const void MathFuncInset::draw(Painter & pain, int x, int y) const { - xo(x); - yo(y); drawStr(pain, LM_TC_TEX, mi_, x, y, name_); } diff --git a/src/mathed/math_funcliminset.C b/src/mathed/math_funcliminset.C index 9939eaf494..5af941b386 100644 --- a/src/mathed/math_funcliminset.C +++ b/src/mathed/math_funcliminset.C @@ -44,7 +44,5 @@ void MathFuncLimInset::metrics(MathMetricsInfo const & mi) const void MathFuncLimInset::draw(Painter & pain, int x, int y) const { - xo(x); - yo(y); drawStr(pain, LM_TC_TEXTRM, mi_, x, y, sym_->name); } diff --git a/src/mathed/math_gridinset.C b/src/mathed/math_gridinset.C index 46b77d2651..e2b3239a5c 100644 --- a/src/mathed/math_gridinset.C +++ b/src/mathed/math_gridinset.C @@ -257,8 +257,6 @@ void MathGridInset::metrics(MathMetricsInfo const & mi) const void MathGridInset::draw(Painter & pain, int x, int y) const { - xo(x); - yo(y); for (idx_type idx = 0; idx < nargs(); ++idx) xcell(idx).draw(pain, x + cellXOffset(idx), y + cellYOffset(idx)); } diff --git a/src/mathed/math_inset.C b/src/mathed/math_inset.C index f8e4575974..40984b1670 100644 --- a/src/mathed/math_inset.C +++ b/src/mathed/math_inset.C @@ -25,7 +25,6 @@ MathInset::MathInset() - : xo_(0), yo_(0) {} @@ -47,30 +46,6 @@ std::ostream & operator<<(std::ostream & os, MathInset const & inset) } -int MathInset::xo() const -{ - return xo_; -} - - -int MathInset::yo() const -{ - return yo_; -} - - -void MathInset::xo(int x) const -{ - xo_ = x; -} - - -void MathInset::yo(int y) const -{ - yo_ = y; -} - - MathInset::size_type MathInset::nargs() const { return 0; @@ -182,13 +157,6 @@ void MathInset::idxDeleteRange(idx_type, idx_type) {} -void MathInset::getXY(int & x, int & y) const -{ - x = xo(); - y = yo(); -} - - void MathInset::writeNormal(std::ostream & os) const { os << "[unknown "; @@ -209,13 +177,8 @@ void MathInset::dump() const bool MathInset::covers(int x, int y) const { - //lyxerr << "cover? p: " << this << " x: " << x << " y: " << y - // << " xo_: " << xo_ << " yo_: " << yo_ << endl; - return - x >= xo_ && - x <= xo_ + width() && - y >= yo_ - ascent() && - y <= yo_ + descent(); + lyxerr << "MathInset::covers() called directly!\n"; + return false; } diff --git a/src/mathed/math_inset.h b/src/mathed/math_inset.h index 665db40f4d..d2a8802bdd 100644 --- a/src/mathed/math_inset.h +++ b/src/mathed/math_inset.h @@ -104,7 +104,7 @@ public: /// the virtual base destructor virtual ~MathInset(); - /// draw the object, sets xo_ and yo_ cached values + /// draw the object virtual void draw(Painter &, int x, int y) const; /// write LaTeX and Lyx code virtual void write(MathWriteInfo & os) const; @@ -171,16 +171,6 @@ public: /// virtual MathXArray const & xcell(idx_type) const; - /// - virtual int xo() const; - /// - virtual int yo() const; - /// - virtual void xo(int tx) const; - /// - virtual void yo(int ty) const; - /// - /// virtual col_type ncols() const { return 1; } /// @@ -202,8 +192,6 @@ public: /// virtual void delCol(col_type) {} - /// - virtual void getXY(int & x, int & y) const; /// virtual bool covers(int x, int y) const; @@ -253,13 +241,6 @@ public: virtual void validate(LaTeXFeatures & features) const; /// virtual void handleFont(MathTextCodes) {} - -private: - /// the following are used for positioning the cursor with the mouse - /// cached cursor start position in pixels from the document left - mutable int xo_; - /// cached cursor start position in pixels from the document top - mutable int yo_; }; std::ostream & operator<<(std::ostream &, MathInset const &); diff --git a/src/mathed/math_macro.C b/src/mathed/math_macro.C index c62f84dac8..5872f070d5 100644 --- a/src/mathed/math_macro.C +++ b/src/mathed/math_macro.C @@ -113,9 +113,6 @@ void MathMacro::metrics(MathMetricsInfo const & mi) const void MathMacro::draw(Painter & pain, int x, int y) const { - xo(x); - yo(y); - metrics(mi_); if (defining()) { diff --git a/src/mathed/math_macrotemplate.C b/src/mathed/math_macrotemplate.C index 486e200cc0..2e9c9d2ef1 100644 --- a/src/mathed/math_macrotemplate.C +++ b/src/mathed/math_macrotemplate.C @@ -67,8 +67,6 @@ void MathMacroTemplate::metrics(MathMetricsInfo const & mi) const void MathMacroTemplate::draw(Painter & pain, int x, int y) const { - xo(x); - yo(y); xcell(0).draw(pain, x + 2, y + 1); pain.rectangle(x, y - ascent(), width(), height(), LColor::blue); } diff --git a/src/mathed/math_matrixinset.C b/src/mathed/math_matrixinset.C index 70c3788326..afa54f4981 100644 --- a/src/mathed/math_matrixinset.C +++ b/src/mathed/math_matrixinset.C @@ -173,9 +173,6 @@ void MathMatrixInset::metrics(MathMetricsInfo const & mi) const void MathMatrixInset::draw(Painter & pain, int x, int y) const { - xo(x); - yo(y); - MathGridInset::draw(pain, x, y); if (numberedType()) { diff --git a/src/mathed/math_nestinset.C b/src/mathed/math_nestinset.C index ac8150043a..2cc97de50a 100644 --- a/src/mathed/math_nestinset.C +++ b/src/mathed/math_nestinset.C @@ -57,8 +57,6 @@ void MathNestInset::metrics(MathMetricsInfo const & mi) const void MathNestInset::draw(Painter & pain, int x, int y) const { - xo(x); - yo(y); for (idx_type i = 0; i < nargs(); ++i) xcell(i).draw(pain, x + xcell(i).xo(), y + xcell(i).yo()); } @@ -161,3 +159,21 @@ void MathNestInset::validate(LaTeXFeatures & features) const for (idx_type i = 0; i < nargs(); ++i) cell(i).validate(features); } + + +bool MathNestInset::covers(int x, int y) const +{ + if (!nargs()) + return false; + int x0 = xcell(0).xo(); + int y0 = xcell(0).yo() - xcell(0).ascent(); + int x1 = xcell(0).xo() + xcell(0).width(); + int y1 = xcell(0).yo() + xcell(0).descent(); + for (idx_type i = 1; i < nargs(); ++i) { + x0 = min(x0, xcell(i).xo()); + y0 = min(y0, xcell(i).yo() - xcell(i).ascent()); + x1 = max(x1, xcell(i).xo() + xcell(i).width()); + y1 = max(y1, xcell(i).yo() + xcell(i).descent()); + } + return x >= x0 && x <= x1 && y >= y0 && y <= y1; +} diff --git a/src/mathed/math_nestinset.h b/src/mathed/math_nestinset.h index 8bf33e0038..1416239b63 100644 --- a/src/mathed/math_nestinset.h +++ b/src/mathed/math_nestinset.h @@ -68,6 +68,8 @@ public: /// void validate(LaTeXFeatures & features) const; + /// + bool covers(int x, int y) const; protected: /// diff --git a/src/mathed/math_notinset.C b/src/mathed/math_notinset.C index 3c6442c7ba..da26ba0a3b 100644 --- a/src/mathed/math_notinset.C +++ b/src/mathed/math_notinset.C @@ -41,9 +41,6 @@ void MathNotInset::metrics(MathMetricsInfo const & mi) const void MathNotInset::draw(Painter & pain, int x, int y) const { - xo(x); - yo(y); - if (math_font_available(LM_TC_CMSY)) drawChar(pain, LM_TC_CMSY, mi_, x, y, 54); else diff --git a/src/mathed/math_rootinset.C b/src/mathed/math_rootinset.C index d5190cea73..d84ec004ac 100644 --- a/src/mathed/math_rootinset.C +++ b/src/mathed/math_rootinset.C @@ -42,8 +42,6 @@ void MathRootInset::metrics(MathMetricsInfo const & mi) const void MathRootInset::draw(Painter & pain, int x, int y) const { - xo(x); - yo(y); int const w = xcell(0).width(); xcell(0).draw(pain, x, y - 5 - xcell(0).descent()); // the "exponent" xcell(1).draw(pain, x + w + 8, y); // the "base" diff --git a/src/mathed/math_scriptinset.C b/src/mathed/math_scriptinset.C index b68c70f26f..39de7947d8 100644 --- a/src/mathed/math_scriptinset.C +++ b/src/mathed/math_scriptinset.C @@ -209,9 +209,6 @@ void MathScriptInset::draw(Painter & pain, int x, int y) const void MathScriptInset::draw(MathInset const * nuc, Painter & pain, int x, int y) const { - xo(x); - yo(y); - if (nuc) nuc->draw(pain, x + dxx(nuc), y); else diff --git a/src/mathed/math_sizeinset.C b/src/mathed/math_sizeinset.C index d7e4c1b530..a06896ba0f 100644 --- a/src/mathed/math_sizeinset.C +++ b/src/mathed/math_sizeinset.C @@ -20,8 +20,6 @@ MathInset * MathSizeInset::clone() const void MathSizeInset::draw(Painter & pain, int x, int y) const { - xo(x); - yo(y); xcell(0).draw(pain, x, y); } diff --git a/src/mathed/math_specialcharinset.C b/src/mathed/math_specialcharinset.C index bfd1eaf130..fad43219c7 100644 --- a/src/mathed/math_specialcharinset.C +++ b/src/mathed/math_specialcharinset.C @@ -44,8 +44,6 @@ void MathSpecialCharInset::metrics(MathMetricsInfo const & mi) const void MathSpecialCharInset::draw(Painter & pain, int x, int y) const { - xo(x); - yo(y); drawChar(pain, LM_TC_CONST, mi_, x, y, char_); } diff --git a/src/mathed/math_sqrtinset.C b/src/mathed/math_sqrtinset.C index 5bfb8112a6..acd1440cf9 100644 --- a/src/mathed/math_sqrtinset.C +++ b/src/mathed/math_sqrtinset.C @@ -30,8 +30,6 @@ void MathSqrtInset::metrics(MathMetricsInfo const & mi) const void MathSqrtInset::draw(Painter & pain, int x, int y) const { - xo(x); - yo(y); xcell(0).draw(pain, x + 10, y); int const a = ascent_; int const d = descent_; diff --git a/src/mathed/math_stackrelinset.C b/src/mathed/math_stackrelinset.C index 1333bc6414..eb19b0ba0f 100644 --- a/src/mathed/math_stackrelinset.C +++ b/src/mathed/math_stackrelinset.C @@ -31,8 +31,6 @@ void MathStackrelInset::metrics(MathMetricsInfo const & mi) const void MathStackrelInset::draw(Painter & pain, int x, int y) const { - xo(x); - yo(y); int m = x + width() / 2; xcell(0).draw(pain, m - xcell(0).width() / 2, y - xcell(0).height() - 4); xcell(1).draw(pain, m - xcell(1).width() / 2, y); diff --git a/src/mathed/math_symbolinset.C b/src/mathed/math_symbolinset.C index 24e3e9a923..09a3cbadad 100644 --- a/src/mathed/math_symbolinset.C +++ b/src/mathed/math_symbolinset.C @@ -81,8 +81,6 @@ void MathSymbolInset::metrics(MathMetricsInfo const & mi) const void MathSymbolInset::draw(Painter & pain, int x, int y) const { - xo(x); - yo(y); MathTextCodes Code = code(); if (sym_->latex_font_id > 0 && math_font_available(Code)) drawChar(pain, Code, mi_, x, y - h_, sym_->latex_font_id);