Skip to content

Commit 5310426

Browse files
committed
Merge pull request godotengine#101868 from bruvzg/rtl_nt_ready
[RTL] Fix `ready` signal sent too early in single threaded RTL.
2 parents 4b9f882 + a5e8c26 commit 5310426

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

scene/gui/rich_text_label.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2914,7 +2914,6 @@ bool RichTextLabel::_find_layout_subitem(Item *from, Item *to) {
29142914
void RichTextLabel::_thread_function(void *p_userdata) {
29152915
set_current_thread_safe_for_nodes(true);
29162916
_process_line_caches();
2917-
updating.store(false);
29182917
callable_mp(this, &RichTextLabel::_thread_end).call_deferred();
29192918
}
29202919

@@ -3082,7 +3081,6 @@ bool RichTextLabel::_validate_line_caches() {
30823081
} else {
30833082
updating.store(true);
30843083
_process_line_caches();
3085-
updating.store(false);
30863084
if (!scroll_visible) {
30873085
vscroll->hide();
30883086
}
@@ -3094,6 +3092,7 @@ bool RichTextLabel::_validate_line_caches() {
30943092
void RichTextLabel::_process_line_caches() {
30953093
// Shape invalid lines.
30963094
if (!is_inside_tree()) {
3095+
updating.store(false);
30973096
return;
30983097
}
30993098

@@ -3116,6 +3115,7 @@ void RichTextLabel::_process_line_caches() {
31163115
main->first_invalid_font_line.store(i);
31173116

31183117
if (stop_thread.load()) {
3118+
updating.store(false);
31193119
return;
31203120
}
31213121
}
@@ -3132,6 +3132,7 @@ void RichTextLabel::_process_line_caches() {
31323132
main->first_resized_line.store(i);
31333133

31343134
if (stop_thread.load()) {
3135+
updating.store(false);
31353136
return;
31363137
}
31373138
}
@@ -3147,6 +3148,7 @@ void RichTextLabel::_process_line_caches() {
31473148
main->first_invalid_font_line.store(i);
31483149

31493150
if (stop_thread.load()) {
3151+
updating.store(false);
31503152
return;
31513153
}
31523154
loaded.store(double(i) / double(main->lines.size()));
@@ -3155,6 +3157,7 @@ void RichTextLabel::_process_line_caches() {
31553157
main->first_invalid_line.store(main->lines.size());
31563158
main->first_resized_line.store(main->lines.size());
31573159
main->first_invalid_font_line.store(main->lines.size());
3160+
updating.store(false);
31583161

31593162
if (fit_content) {
31603163
update_minimum_size();

0 commit comments

Comments
 (0)