From 388c636c07abc187569234a0fd39cbc2e178b0a3 Mon Sep 17 00:00:00 2001 From: Abdelrazak Younes Date: Sun, 23 Sep 2007 16:59:47 +0000 Subject: [PATCH] Temporarily fix cursor positioning within mathed. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20453 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/mathed/InsetMathSymbol.cpp | 4 ++++ src/mathed/InsetMathSymbol.h | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/src/mathed/InsetMathSymbol.cpp b/src/mathed/InsetMathSymbol.cpp index ed8af7b3c8..6703913616 100644 --- a/src/mathed/InsetMathSymbol.cpp +++ b/src/mathed/InsetMathSymbol.cpp @@ -82,6 +82,10 @@ void InsetMathSymbol::metrics(MetricsInfo & mi, Dimension & dim) const if (sym_->inset == "cmex" || sym_->inset == "esint" || sym_->extra == "funclim") scriptable_ = true; + + // Cache the inset dimension. + // FIXME: put the resulting dim in BufferView. + dim_ = dim; } diff --git a/src/mathed/InsetMathSymbol.h b/src/mathed/InsetMathSymbol.h index bc33d2481a..3068d943ab 100644 --- a/src/mathed/InsetMathSymbol.h +++ b/src/mathed/InsetMathSymbol.h @@ -35,6 +35,8 @@ public: /// void metrics(MetricsInfo & mi, Dimension & dim) const; /// + Dimension const dimension(BufferView const &) const { return dim_; } + /// void draw(PainterInfo &, int x, int y) const; /// int kerning() const { return kerning_; } @@ -81,6 +83,8 @@ private: mutable int kerning_; /// mutable bool scriptable_; + /// FIXME: move this out to BufferView + mutable Dimension dim_; }; } // namespace lyx -- 2.39.2