]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetTabular.cpp
correctly draw selected multirow cells
[lyx.git] / src / insets / InsetTabular.cpp
index d689b63dadc538a2a865b0ad9b000a5a6046c74d..c323e9f007f90f1b4738ee337808108a55b7687a 100644 (file)
@@ -3259,7 +3259,9 @@ bool InsetTabular::isCellSelected(Cursor & cur, row_type row, col_type col)
                        col_type cs, ce;
                        getSelection(cur, rs, re, cs, ce);
                        
-                       if (col >= cs && col <= ce && row >= rs && row <= re)
+                       idx_type const cell = tabular.cellIndex(row, col);
+                       row_type const span = tabular.rowSpan(cell);
+                       if (col >= cs && col <= ce && row + span - 1 >= rs && row <= re)
                                return true;
                } else 
                        if (col == tabular.cellColumn(cur.idx())