Fixed RichTextLabel wrong selection offset in padded table cell.
This commit is contained in:
parent
91fedb60de
commit
6f11cf7d31
1 changed files with 1 additions and 1 deletions
|
@ -1510,7 +1510,7 @@ float RichTextLabel::_find_click_in_line(ItemFrame *p_frame, int p_line, const V
|
||||||
}
|
}
|
||||||
if (crect.has_point(p_click)) {
|
if (crect.has_point(p_click)) {
|
||||||
for (int j = 0; j < (int)frame->lines.size(); j++) {
|
for (int j = 0; j < (int)frame->lines.size(); j++) {
|
||||||
_find_click_in_line(frame, j, rect.position + Vector2(0, frame->lines[j].offset.y), rect.size.x, p_click, &table_click_frame, &table_click_line, &table_click_item, &table_click_char, true, p_meta);
|
_find_click_in_line(frame, j, rect.position + Vector2(frame->padding.position.x, frame->lines[j].offset.y), rect.size.x, p_click, &table_click_frame, &table_click_line, &table_click_item, &table_click_char, true, p_meta);
|
||||||
if (table_click_frame && table_click_item) {
|
if (table_click_frame && table_click_item) {
|
||||||
// Save cell detected cell hit data.
|
// Save cell detected cell hit data.
|
||||||
table_range = Vector2i(INT32_MAX, 0);
|
table_range = Vector2i(INT32_MAX, 0);
|
||||||
|
|
Loading…
Reference in a new issue