diff options
author | Koyper <tim@maffle.com> | 2023-01-20 09:55:27 -0600 |
---|---|---|
committer | Koyper <tim@maffle.com> | 2023-01-20 09:55:27 -0600 |
commit | 6f11cf7d31101bc9f4d3c5d644f90b231cd7ce4f (patch) | |
tree | 407db5a51a29edcf01e4f789dd3a44dfdda7218b | |
parent | 91fedb60de6011434938499a9d4a7d4fd1cd4f06 (diff) | |
download | redot-engine-6f11cf7d31101bc9f4d3c5d644f90b231cd7ce4f.tar.gz |
Fixed RichTextLabel wrong selection offset in padded table cell.
-rw-r--r-- | scene/gui/rich_text_label.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scene/gui/rich_text_label.cpp b/scene/gui/rich_text_label.cpp index 5ab64b35fd..caf86bd18f 100644 --- a/scene/gui/rich_text_label.cpp +++ b/scene/gui/rich_text_label.cpp @@ -1510,7 +1510,7 @@ float RichTextLabel::_find_click_in_line(ItemFrame *p_frame, int p_line, const V } if (crect.has_point(p_click)) { 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) { // Save cell detected cell hit data. table_range = Vector2i(INT32_MAX, 0); |