Mark dirty flags when shaped texts are invalidated

This commit is contained in:
MinusKube 2023-01-28 03:31:44 +01:00
parent a43db5afa4
commit d59c221404
5 changed files with 53 additions and 0 deletions

View file

@ -101,6 +101,11 @@ void TextLine::_bind_methods() {
}
void TextLine::_shape() {
// When a shaped text is invalidated by an external source, we want to reshape it.
if (!TS->shaped_text_is_ready(rid)) {
dirty = true;
}
if (dirty) {
if (!tab_stops.is_empty()) {
TS->shaped_text_tab_align(rid, tab_stops);