1
0
mirror of https://github.com/godotengine/godot.git synced 2026-01-05 19:31:35 +00:00

Merge pull request #101868 from bruvzg/rtl_nt_ready

[RTL] Fix `ready` signal sent too early in single threaded RTL.
This commit is contained in:
Thaddeus Crews
2025-01-29 17:45:18 -06:00

View File

@@ -2914,7 +2914,6 @@ bool RichTextLabel::_find_layout_subitem(Item *from, Item *to) {
void RichTextLabel::_thread_function(void *p_userdata) {
set_current_thread_safe_for_nodes(true);
_process_line_caches();
updating.store(false);
callable_mp(this, &RichTextLabel::_thread_end).call_deferred();
}
@@ -3082,7 +3081,6 @@ bool RichTextLabel::_validate_line_caches() {
} else {
updating.store(true);
_process_line_caches();
updating.store(false);
if (!scroll_visible) {
vscroll->hide();
}
@@ -3094,6 +3092,7 @@ bool RichTextLabel::_validate_line_caches() {
void RichTextLabel::_process_line_caches() {
// Shape invalid lines.
if (!is_inside_tree()) {
updating.store(false);
return;
}
@@ -3116,6 +3115,7 @@ void RichTextLabel::_process_line_caches() {
main->first_invalid_font_line.store(i);
if (stop_thread.load()) {
updating.store(false);
return;
}
}
@@ -3132,6 +3132,7 @@ void RichTextLabel::_process_line_caches() {
main->first_resized_line.store(i);
if (stop_thread.load()) {
updating.store(false);
return;
}
}
@@ -3147,6 +3148,7 @@ void RichTextLabel::_process_line_caches() {
main->first_invalid_font_line.store(i);
if (stop_thread.load()) {
updating.store(false);
return;
}
loaded.store(double(i) / double(main->lines.size()));
@@ -3155,6 +3157,7 @@ void RichTextLabel::_process_line_caches() {
main->first_invalid_line.store(main->lines.size());
main->first_resized_line.store(main->lines.size());
main->first_invalid_font_line.store(main->lines.size());
updating.store(false);
if (fit_content) {
update_minimum_size();