]> git.lyx.org Git - features.git/commitdiff
Temporarily fix cursor positioning within mathed.
authorAbdelrazak Younes <younes@lyx.org>
Sun, 23 Sep 2007 16:59:47 +0000 (16:59 +0000)
committerAbdelrazak Younes <younes@lyx.org>
Sun, 23 Sep 2007 16:59:47 +0000 (16:59 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20453 a592a061-630c-0410-9148-cb99ea01b6c8

src/mathed/InsetMathSymbol.cpp
src/mathed/InsetMathSymbol.h

index ed8af7b3c8593733c5408b1d8a292b80f89cdcf2..670391361659555bd35327570e68f1366a537622 100644 (file)
@@ -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;
 }
 
 
index bc33d2481a4963ce148eedbe05128d915a274a97..3068d943abd719715c4fb3e54028dff0610ec492 100644 (file)
@@ -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