From 0a1a5396ec4681f86daa3c2565cf91cc2a699fad Mon Sep 17 00:00:00 2001 From: Dmitry Koteroff Date: Mon, 4 Dec 2017 18:46:20 +0300 Subject: [PATCH] Rich Text Label: fixed deselection issue --- scene/gui/rich_text_label.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/scene/gui/rich_text_label.cpp b/scene/gui/rich_text_label.cpp index 124c268c8a4..9cf4c105b46 100644 --- a/scene/gui/rich_text_label.cpp +++ b/scene/gui/rich_text_label.cpp @@ -793,6 +793,17 @@ void RichTextLabel::_gui_input(Ref p_event) { selection.click = item; selection.click_char = line; + + // Erase previous selection. + if (selection.active) { + selection.from = NULL; + selection.from_char = NULL; + selection.to = NULL; + selection.to_char = NULL; + selection.active = false; + + update(); + } } }