]> git.lyx.org Git - features.git/commitdiff
cosmetic bugfix in selection of tables
authorAlfredo Braunstein <abraunst@lyx.org>
Mon, 21 Mar 2005 10:17:21 +0000 (10:17 +0000)
committerAlfredo Braunstein <abraunst@lyx.org>
Mon, 21 Mar 2005 10:17:21 +0000 (10:17 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@9727 a592a061-630c-0410-9148-cb99ea01b6c8

src/insets/ChangeLog
src/insets/insettabular.C

index 289b7a6e3023d0ab69ba43fda713d398cd7f5ce3..568bc78994bce1ca6d3ee25ef240e119c7ffcfab 100644 (file)
@@ -1,3 +1,8 @@
+
+2005-03-21  Alfredo Braunstein  <abraunst@lyx.org>
+
+       * insettabular.C (drawSelection): cosmetic bugfix 
+
 2005-03-17  Jürgen Spitzmüller  <j.spitzmueller@gmx.de>
 
        * insettabular.C (doDispatch): get middle mouse button back again
index 029f0823e583c7e7336aa4b047626c21f040bd27..9b929b4c11effa255af6092295e8796c7c5d04ca 100644 (file)
@@ -331,6 +331,7 @@ void InsetTabular::drawSelection(PainterInfo & pi, int x, int y) const
                row_type rs, re;
                col_type cs, ce;
                getSelection(cur, rs, re, cs, ce);
+               y -= tabular.getAscentOfRow(0);
                for (row_type j = 0; j < tabular.rows(); ++j) {
                        int const a = tabular.getAscentOfRow(j);
                        int const h = a + tabular.getDescentOfRow(j);
@@ -343,7 +344,7 @@ void InsetTabular::drawSelection(PainterInfo & pi, int x, int y) const
                                        tabular.getCellNumber(j, i);
                                int const w = tabular.getWidthOfColumn(cell);
                                if (i >= cs && i <= ce && j >= rs && j <= re)
-                                       pi.pain.fillRectangle(xx, y - a, w, h,
+                                       pi.pain.fillRectangle(xx, y, w, h,
                                                              LColor::selection);
                                xx += w;