You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For reference, I am using above code to change in-game scenes. This has worked for all versions until now and this property has been crucial for my project.
As of now, rich text labels are being reverted to default when above function switches to another mini-scene, then back.
Below is the edited rich text label using parsed bbcode(I tested and the code that edits the text does not run when switched back)
Now when the first function is called twice to change to another section then back, it turns into this, which is what it looks like initially and in the editor. No other nodes are affected except rich text labels.
Interestingly enough, with one of my rich text labels that was edited through a multi-threaded-process, it seems to keep the edits even with the scene change, however, the other rich text labels in that scene revert back to default.
Steps to reproduce
1: Create scene with rich text label
2: Add functionality to parse bbcode and change the text
3: Create a main scene
4: Use supplied function
For the project!
1: click the change scene button
2: click the change rich text button
3: click the change scene button twice
4: see the result
The text was updated successfully, but these errors were encountered:
elfkan
changed the title
Rich text labels resetting when scene tree modified in game Godot 4.3
Rich text labels resetting when scene tree modified in game Godot 4.3-stable
Sep 12, 2024
elfkan
changed the title
Rich text labels resetting when scene tree modified in game Godot 4.3-stable
Rich text labels resetting unexpectedly when scene tree modified in game Godot 4.3-stable
Sep 13, 2024
As a workaround you can disable auto translation, but I would say this is still a bug and the text shouldn't overwrite just on entering tree like this, but needs some discussion on what is the expected behavior and how to approach it
However there is a clear regression, as enabling the old auto translate option (in a build from [e31b253] or earlier) does not replicate this bug, so this has changed, i.e. enabling the old auto translate setting does not cause this, but having the new setting set to inherit does
Just for my 2 cents, it is a lot easier for a dev to reset the text through code on scene change rather than store a string that resulted through an expensive function, and then make the top node call the scene to change the text back to desired display. Especially when most other gui elements follow the same rules.
At minimum the change in behavior needs to be evaluated and we need to see if that was a known consequence of this, can't find anything in the discussion on that PR that implies that this was expected, so I think this was unintentional
I'd say that entering the tree again shouldn't reset the text like this, but it could be related to the assignment of the bbcode like this or parsing, but it's unexpected and should at least be documented if it is considered an acceptable limitation or even desired behavior, but I'd say it's at least surprising and unusual and especially a significant change from the previous behavior
Tested versions
System information
Godot v4.3.stable - Windows 10.0.19045 - GLES3 (Compatibility) - NVIDIA GeForce MX250 (NVIDIA; 31.0.15.4629) - Intel(R) Core(TM) i7-10510U CPU @ 1.80GHz (8 Threads)
Issue description
For reference, I am using above code to change in-game scenes. This has worked for all versions until now and this property has been crucial for my project.
As of now, rich text labels are being reverted to default when above function switches to another mini-scene, then back.
Below is the edited rich text label using parsed bbcode(I tested and the code that edits the text does not run when switched back)
Now when the first function is called twice to change to another section then back, it turns into this, which is what it looks like initially and in the editor. No other nodes are affected except rich text labels.
Interestingly enough, with one of my rich text labels that was edited through a multi-threaded-process, it seems to keep the edits even with the scene change, however, the other rich text labels in that scene revert back to default.
Steps to reproduce
1: Create scene with rich text label
2: Add functionality to parse bbcode and change the text
3: Create a main scene
4: Use supplied function
For the project!
1: click the change scene button
2: click the change rich text button
3: click the change scene button twice
4: see the result
Minimal reproduction project (MRP)
richlabelbug.zip
The text was updated successfully, but these errors were encountered: