Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RichTextLabel loses its (simple) text after scene reopen in editor in Godot 4.0 #47471

Closed
felrugo opened this issue Mar 29, 2021 · 4 comments · Fixed by #47486
Closed

RichTextLabel loses its (simple) text after scene reopen in editor in Godot 4.0 #47471

felrugo opened this issue Mar 29, 2021 · 4 comments · Fixed by #47486

Comments

@felrugo
Copy link

felrugo commented Mar 29, 2021

Godot version:
4.0 commit: 02471ba

OS/device including version:
Windows 10 1909

Issue description:
After reopening a Scene its RechTextLabel nodes lost their texts. The text fields were empty.
A small debug session showed that the attribute was saved in the .tscn file and in the load stage the set_text function of
RichTextLabel was called. Therefore the bug probably is in the implementation of the RichTextLabel and not in the ResourceLoader.

Steps to reproduce:

  1. Create a Scene with a Control root node and a RichTextLabel node as its child.
  2. Set the text of the RichTextLabel and save the scene
  3. Close the scene and reopen it
  4. After the reopen the text field of the RichTextLabel is empty
@Calinou
Copy link
Member

Calinou commented Mar 29, 2021

@felrugo Can you reproduce this on 3.2.3 or 3.3rc6?

@Calinou Calinou added this to the 4.0 milestone Mar 29, 2021
@felrugo
Copy link
Author

felrugo commented Mar 29, 2021

@Calinou No, it doesn't appear in the 3.2.3 and 3.3rc6 version, only in 4.0.

@Calinou
Copy link
Member

Calinou commented Mar 29, 2021

cc @bruvzg

@bruvzg
Copy link
Member

bruvzg commented Mar 29, 2021

It's overwritten by bbcode (even when bbcode value is not saved in the resource), set_bbcode and set_text code is the same as in 3.x, something has been changed in the resource loading process (maybe it's loading default values for the missing properties instead of skipping them).~

The best solution probably is removing duplicate text/bbcode properties - #39148.

Edit: Actually it's overwritten by custom_effects, but the idea is the same.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants