Ticket #15196 (closed defect: fixed)
wxRichTextCell caret issues
|Reported by:||dghart||Owned by:|
|Keywords:||wxRichTextCell caret hittest||Cc:|
There are two problems with the placement of the caret in a wxRichTextCell.
The first can be seen in the unmodified richtext sample (though it might need expanding so that the cells are a reasonable size). Click in any cell in the space below the text. This area doesn't seem to be recognised as part of the cell, and the caret is set outside the table.
The second can be demonstrated by first applying richtext.diff from #15189, and patch2.diff if it's not already been added. Then apply the attached richtext.diff on top: this adds SetInsertionPointEnd() to make the issue more obvious. Run richtext and click in cell 1,4. Then 'run' the About dialog to delete that column. The caret should now be placed in cell 1,5; instead it's outside the table, as can be seen in the attached screenshot.
Without the SetInsertionPointEnd() call the caret is often still misplaced, though less so. It seems to depend on the initial offset of the caret in the wxRTC: it's worse the further right it is due to earlier cells, or perhaps due to text preceding the table.