From 67905de3fcd6372b4be6288c04276ea1e149406b Mon Sep 17 00:00:00 2001 From: Abdelrazak Younes Date: Wed, 5 Sep 2007 21:02:49 +0000 Subject: [PATCH] Fix tabular text y-positioning git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20080 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/insets/InsetTabular.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/insets/InsetTabular.cpp b/src/insets/InsetTabular.cpp index ff89ddd931..d2a125c2eb 100644 --- a/src/insets/InsetTabular.cpp +++ b/src/insets/InsetTabular.cpp @@ -3015,6 +3015,7 @@ void InsetTabular::draw(PainterInfo & pi, int x, int y) const int const a = tabular.rowAscent(i); int const d = tabular.rowDescent(i); idx = tabular.cellIndex(i, 0); + int const cy = y - a; for (col_type j = 0; j < tabular.columnCount(); ++j) { if (tabular.isPartOfMultiColumn(i, j)) continue; @@ -3027,11 +3028,11 @@ void InsetTabular::draw(PainterInfo & pi, int x, int y) const || y + d < 0 || y - a > bv->workHeight()) { pi.pain.setDrawingEnabled(false); - cell(idx)->draw(pi, cx, y); + cell(idx)->draw(pi, cx, cy); drawCellLines(pi.pain, nx, y, i, idx, pi.erased_); pi.pain.setDrawingEnabled(true); } else { - cell(idx)->draw(pi, cx, y); + cell(idx)->draw(pi, cx, cy); drawCellLines(pi.pain, nx, y, i, idx, pi.erased_); } nx += tabular.columnWidth(idx); -- 2.39.2