Skip to content

Commit

Permalink
Fix line_separation working incorrectly in find_click of RichTextLabel
Browse files Browse the repository at this point in the history
Apply suggestions from code review

Co-authored-by: bruvzg <7645683+bruvzg@users.noreply.github.com>
  • Loading branch information
requizm and bruvzg committed Aug 20, 2021
1 parent 2daef04 commit 31face3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scene/gui/rich_text_label.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1127,7 +1127,7 @@ void RichTextLabel::_find_click(ItemFrame *p_frame, const Point2i &p_click, Item
Point2 ofs = text_rect.get_position() + Vector2(0, main->lines[from_line].offset.y - vofs);
while (ofs.y < size.height && from_line < main->lines.size()) {
_find_click_in_line(p_frame, from_line, ofs, text_rect.size.x, p_click, r_click_frame, r_click_line, r_click_item, r_click_char);
ofs.y += main->lines[from_line].text_buf->get_size().y;
ofs.y += main->lines[from_line].text_buf->get_size().y + get_theme_constant(SNAME("line_separation"));
if (((r_click_item != nullptr) && ((*r_click_item) != nullptr)) || ((r_click_frame != nullptr) && ((*r_click_frame) != nullptr))) {
if (r_outside != nullptr) {
*r_outside = false;
Expand Down

0 comments on commit 31face3

Please sign in to comment.