From: Vincent van Ravesteijn Date: Sat, 17 Mar 2012 23:05:15 +0000 (+0100) Subject: Fix bug #8083: Fix the selection of cells below multirows X-Git-Tag: 2.1.0beta1~1936 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=96e854ab765ec8f58e44ecf7b6bf63cf9e44c90d;p=features.git Fix bug #8083: Fix the selection of cells below multirows Multirows were introduced in 8bb69f24 (Uwe Stoehr, 11 Feb 2010). In the computation of the nearest cell, it was forgotten to account for the vertical offset. tabular.cellHeight is the full height of the cell, while the point that comes from the coordCache is offsetted by VOffset. Therefore, we have to subtract the VOffset from o.y_. --- diff --git a/src/insets/InsetTabular.cpp b/src/insets/InsetTabular.cpp index 272dae4de8..57bca38693 100644 --- a/src/insets/InsetTabular.cpp +++ b/src/insets/InsetTabular.cpp @@ -4893,7 +4893,7 @@ int InsetTabular::dist(BufferView & bv, idx_type const cell, int x, int y) const int const xend = xbeg + tabular.cellWidth(cell); row_type const row = tabular.cellRow(cell); int const ybeg = o.y_ - tabular.rowAscent(row) - - tabular.interRowSpace(row); + - tabular.interRowSpace(row) - tabular.textVOffset(cell); int const yend = ybeg + tabular.cellHeight(cell); if (x < xbeg)