diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2023-02-13 09:13:27 +0100 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2023-02-13 09:13:27 +0100 |
commit | a90bbc3544df328f1dad978d47d639c3b02e7c10 (patch) | |
tree | ecdea76c957b0b994161ea083d013c9823f1f185 /scene/gui/label.cpp | |
parent | 428bf1188debc9ad95ec2f192aba75b29839081b (diff) | |
parent | ba472bd29cf6aa8c616c4d4fbb18cd2b0825f3a2 (diff) | |
download | redot-engine-a90bbc3544df328f1dad978d47d639c3b02e7c10.tar.gz |
Merge pull request #72225 from MinusKube/shaped_text_invalidated_bug
Mark dirty flags when shaped texts are invalidated
Diffstat (limited to 'scene/gui/label.cpp')
-rw-r--r-- | scene/gui/label.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/scene/gui/label.cpp b/scene/gui/label.cpp index 47384a9551..829f4cc643 100644 --- a/scene/gui/label.cpp +++ b/scene/gui/label.cpp @@ -350,6 +350,18 @@ void Label::_notification(int p_what) { RenderingServer::get_singleton()->canvas_item_set_clip(get_canvas_item(), true); } + // When a shaped text is invalidated by an external source, we want to reshape it. + if (!TS->shaped_text_is_ready(text_rid)) { + dirty = true; + } + + for (const RID &line_rid : lines_rid) { + if (!TS->shaped_text_is_ready(line_rid)) { + lines_dirty = true; + break; + } + } + if (dirty || font_dirty || lines_dirty) { _shape(); if (lines_dirty) { |