From: Edwin Leuven Date: Tue, 16 Mar 2010 09:50:58 +0000 (+0000) Subject: and also correctly draw selected multicolumn cells while we're at it... X-Git-Tag: 2.0.0~3787 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=613f9d89963b85816f5c2613017a3ebdc6145531;p=features.git and also correctly draw selected multicolumn cells while we're at it... git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33765 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/insets/InsetTabular.cpp b/src/insets/InsetTabular.cpp index c323e9f007..137e8812dd 100644 --- a/src/insets/InsetTabular.cpp +++ b/src/insets/InsetTabular.cpp @@ -3260,8 +3260,10 @@ bool InsetTabular::isCellSelected(Cursor & cur, row_type row, col_type col) getSelection(cur, rs, re, cs, ce); 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) + col_type const cspan = tabular.columnSpan(cell); + row_type const rspan = tabular.rowSpan(cell); + if (col + cspan - 1 >= cs && col <= ce + && row + rspan - 1 >= rs && row <= re) return true; } else if (col == tabular.cellColumn(cur.idx())