summaryrefslogtreecommitdiff
path: root/scene/gui
diff options
context:
space:
mode:
authorKoyper <tim@maffle.com>2023-01-20 09:55:27 -0600
committerYuri Sizov <yuris@humnom.net>2023-04-24 16:28:24 +0200
commit7e482f420d19bb4318f3ca448b014177b4f6baa4 (patch)
treeaa56cdeab99d04453881c1624371e5bf38ef10ca /scene/gui
parentb5ff677381e2e846c0512fb41c5f4d4c2c8abd23 (diff)
Fixed RichTextLabel wrong selection offset in padded table cell.
(cherry picked from commit 6f11cf7d31101bc9f4d3c5d644f90b231cd7ce4f)
Diffstat (limited to 'scene/gui')
-rw-r--r--scene/gui/rich_text_label.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/scene/gui/rich_text_label.cpp b/scene/gui/rich_text_label.cpp
index 68e12b9bb5..849f217b4a 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);