Browse Source

Merge pull request #30927 from mahubu/console-multi-selection-cursor

Change cursor to multi-selection cursor when selecting text in RichTextLabel
Rémi Verschelde 6 years ago
parent
commit
58e7cbccc0
1 changed files with 4 additions and 1 deletions
  1. 4 1
      scene/gui/rich_text_label.cpp

+ 4 - 1
scene/gui/rich_text_label.cpp

@@ -916,9 +916,12 @@ void RichTextLabel::_find_click(ItemFrame *p_frame, const Point2i &p_click, Item
 
 
 Control::CursorShape RichTextLabel::get_cursor_shape(const Point2 &p_pos) const {
 Control::CursorShape RichTextLabel::get_cursor_shape(const Point2 &p_pos) const {
 
 
-	if (!underline_meta || selection.click)
+	if (!underline_meta)
 		return CURSOR_ARROW;
 		return CURSOR_ARROW;
 
 
+	if (selection.click)
+		return CURSOR_IBEAM;
+
 	if (main->first_invalid_line < main->lines.size())
 	if (main->first_invalid_line < main->lines.size())
 		return CURSOR_ARROW; //invalid
 		return CURSOR_ARROW; //invalid