浏览代码

Merge pull request #12653 from poke1024/fixdocsclick

Fix selection and clicks on text in tables in RichTextLabel
Rémi Verschelde 7 年之前
父节点
当前提交
386ec5d954
共有 1 个文件被更改,包括 3 次插入0 次删除
  1. 3 0
      scene/gui/rich_text_label.cpp

+ 3 - 0
scene/gui/rich_text_label.cpp

@@ -526,6 +526,9 @@ int RichTextLabel::_process_line(ItemFrame *p_frame, const Vector2 &p_ofs, int &
 								nonblank_line_count += _process_line(frame, p_ofs + offset + draw_ofs + Vector2(0, yofs), ly, table->columns[column].width, i, PROCESS_DRAW, cfont, ccolor);
 								nonblank_line_count += _process_line(frame, p_ofs + offset + draw_ofs + Vector2(0, yofs), ly, table->columns[column].width, i, PROCESS_DRAW, cfont, ccolor);
 							} else if (p_mode == PROCESS_POINTER) {
 							} else if (p_mode == PROCESS_POINTER) {
 								_process_line(frame, p_ofs + offset + draw_ofs + Vector2(0, yofs), ly, table->columns[column].width, i, PROCESS_POINTER, cfont, ccolor, p_click_pos, r_click_item, r_click_char, r_outside);
 								_process_line(frame, p_ofs + offset + draw_ofs + Vector2(0, yofs), ly, table->columns[column].width, i, PROCESS_POINTER, cfont, ccolor, p_click_pos, r_click_item, r_click_char, r_outside);
+								if (r_click_item && *r_click_item) {
+									RETURN; // exit early
+								}
 							}
 							}
 						}
 						}