From bf94991c65f451719bf8429e95f7f7e6fef9543c Mon Sep 17 00:00:00 2001 From: Jean-Marc Lasgouttes Date: Mon, 10 Dec 2001 13:30:27 +0000 Subject: [PATCH] cleanup my latest cleanup git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@3178 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/insets/ChangeLog | 5 +++++ src/insets/insettext.C | 8 +++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/src/insets/ChangeLog b/src/insets/ChangeLog index 264b1d5acb..940ab34dd4 100644 --- a/src/insets/ChangeLog +++ b/src/insets/ChangeLog @@ -1,3 +1,8 @@ +2001-12-10 Jean-Marc Lasgouttes + + * insettext.C (draw): re-introduce the calls to width() ascent() + and descent() to initialize the caching variables. + 2001-12-09 Jean-Marc Lasgouttes * insettext.C (draw): diff --git a/src/insets/insettext.C b/src/insets/insettext.C index f24cd8df44..aff7ff54ea 100644 --- a/src/insets/insettext.C +++ b/src/insets/insettext.C @@ -413,8 +413,14 @@ void InsetText::draw(BufferView * bv, LyXFont const & f, return; } + // call these methods so that insetWidth, insetAscent and + // insetDescent have the right values. + width(bv, f); + ascent(bv, f); + descent(bv, f); + top_baseline = baseline; - top_y = baseline - ascent(bv, f); + top_y = baseline - insetAscent; if (last_drawn_width != insetWidth) { if (!cleared) -- 2.39.2