Temporarily fix cursor positioning within mathed.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20452 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Abdelrazak Younes 2007-09-23 16:55:15 +00:00
parent 64a8c4b35c
commit 696b5d29b5
2 changed files with 7 additions and 0 deletions

View File

@ -85,6 +85,9 @@ void InsetMathChar::metrics(MetricsInfo & mi, Dimension & dim) const
dim.wid += 2 * theFontMetrics(font_).width(' ');
lyxerr << "InsetMathChar::metrics: " << dim << endl;
#endif
// Cache the inset dimension.
// FIXME: put the resulting dim in BufferView.
dim_ = dim;
}

View File

@ -26,6 +26,8 @@ public:
///
void metrics(MetricsInfo & mi, Dimension & dim) const;
///
Dimension const dimension(BufferView const &) const { return dim_; }
///
void draw(PainterInfo & pi, int x, int y) const;
///
void metricsT(TextMetricsInfo const & mi, Dimension & dim) const;
@ -55,6 +57,8 @@ private:
char_type char_;
/// cached kerning for superscript
mutable int kerning_;
/// FIXME: move this out to BufferView
mutable Dimension dim_;
};
} // namespace lyx