summaryrefslogtreecommitdiff
path: root/scene/gui
diff options
context:
space:
mode:
authorDmitry Koteroff <vortex@verona.im>2017-12-04 18:46:20 +0300
committerDmitry Koteroff <vortex@verona.im>2017-12-04 18:46:20 +0300
commit0a1a5396ec4681f86daa3c2565cf91cc2a699fad (patch)
tree5781b581ec2100915726fcc69ff58d9568374a2a /scene/gui
parent1a317a39edbad6452a17d1c5c3b6e2da51ca2e91 (diff)
Rich Text Label: fixed deselection issue
Diffstat (limited to 'scene/gui')
-rw-r--r--scene/gui/rich_text_label.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/scene/gui/rich_text_label.cpp b/scene/gui/rich_text_label.cpp
index 124c268c8a..9cf4c105b4 100644
--- a/scene/gui/rich_text_label.cpp
+++ b/scene/gui/rich_text_label.cpp
@@ -793,6 +793,17 @@ void RichTextLabel::_gui_input(Ref<InputEvent> 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();
+ }
}
}