aboutsummaryrefslogtreecommitdiff
path: root/scene/gui/label.cpp
diff options
context:
space:
mode:
authorJuan Linietsky2017-06-28 17:00:18 -0300
committerJuan Linietsky2017-06-28 17:01:35 -0300
commitdb3b05d2893dcaddeb3bcb10b845ff150eb50895 (patch)
treee19d761357300ba03360593e3cbdda01e87f215e /scene/gui/label.cpp
parent9e54e1f34f7ee0b100b45fa2388f25096eb90670 (diff)
downloadgodot-db3b05d2893dcaddeb3bcb10b845ff150eb50895.tar.gz
godot-db3b05d2893dcaddeb3bcb10b845ff150eb50895.tar.zst
godot-db3b05d2893dcaddeb3bcb10b845ff150eb50895.zip
Diffstat (limited to 'scene/gui/label.cpp')
-rw-r--r--scene/gui/label.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/scene/gui/label.cpp b/scene/gui/label.cpp
index f3a279bad..fb85930ce 100644
--- a/scene/gui/label.cpp
+++ b/scene/gui/label.cpp
@@ -65,7 +65,12 @@ void Label::_notification(int p_what) {
if (p_what == NOTIFICATION_TRANSLATION_CHANGED) {
- xl_text = XL_MESSAGE(text);
+ String new_text = XL_MESSAGE(text);
+ if (new_text == xl_text)
+ return; //nothing new
+ xl_text = new_text;
+
+ regenerate_word_cache();
minimum_size_changed();
update();
}