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/3d | |
parent | 428bf1188debc9ad95ec2f192aba75b29839081b (diff) | |
parent | ba472bd29cf6aa8c616c4d4fbb18cd2b0825f3a2 (diff) |
Merge pull request #72225 from MinusKube/shaped_text_invalidated_bug
Mark dirty flags when shaped texts are invalidated
Diffstat (limited to 'scene/3d')
-rw-r--r-- | scene/3d/label_3d.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/scene/3d/label_3d.cpp b/scene/3d/label_3d.cpp index b39ca43d2e..5fc36abb76 100644 --- a/scene/3d/label_3d.cpp +++ b/scene/3d/label_3d.cpp @@ -442,6 +442,18 @@ void Label3D::_generate_glyph_surfaces(const Glyph &p_glyph, Vector2 &r_offset, } void Label3D::_shape() { + // When a shaped text is invalidated by an external source, we want to reshape it. + if (!TS->shaped_text_is_ready(text_rid)) { + dirty_text = true; + } + + for (const RID &line_rid : lines_rid) { + if (!TS->shaped_text_is_ready(line_rid)) { + dirty_lines = true; + break; + } + } + // Clear mesh. RS::get_singleton()->mesh_clear(mesh); aabb = AABB(); |