Temporarily fix cursor positioning within mathed.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20453 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Abdelrazak Younes 2007-09-23 16:59:47 +00:00
parent 696b5d29b5
commit 388c636c07
2 changed files with 8 additions and 0 deletions

View 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;
}

View 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