diff options
author | MinusKube <minuskube@gmail.com> | 2023-01-28 03:31:44 +0100 |
---|---|---|
committer | MinusKube <minuskube@gmail.com> | 2023-01-28 03:31:55 +0100 |
commit | d59c2214042d8623d28cea04af0f4e8ab10280bd (patch) | |
tree | 1f5128eab673500f549d8459151574fa3f0a9671 /scene/gui | |
parent | a43db5afa4bbec4772be2f296931a6d44bb4cbb3 (diff) |
Mark dirty flags when shaped texts are invalidated
Diffstat (limited to 'scene/gui')
-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 f59702835c..05aec8f08b 100644 --- a/scene/gui/label.cpp +++ b/scene/gui/label.cpp @@ -345,6 +345,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(); } |