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
Reproduced in 4.3-dev4. Not reproducible in 4.2.1-stable.
System information
Windows 11
Issue description
I'm not 100% sure if this is in fact a bug, but it is at the very least an unexpected version incompatibility.
The behaviour of RichTextLabel.clear() and RichTextLabel.text = "" is different between Godot 4.2 and 4.3.
The context is instantiating a scene with a single RichTextLabel containing some placeholder text, and then immediately clearing the text when adding the instantiated node to the scene tree (the placeholder text is useful for testing the RichTextLabel scene in isolation).
In Godot 4.2:
When calling clear() or setting text = "" before the node is added to the scene tree (between instantiating a scene and calling add_child), the RichTextLabel will appear empty as expected.
In Godot 4.3-dev4:
When calling clear() before the node is added to the scene tree (between instantiating a scene and calling add_child), the RichTextLabel still has the placeholder text from the original scene.
When setting text = "", either before or after add_child, the original text remains visible. This means you essentially have to call both clear() and set text = "" to fully reset the contents.
Steps to reproduce
extendsControlconstTextLabel:=preload("res://rich_text_label.tscn")
# Produces expected behavior in 4.2, but in 4.3func_ready() ->void:
varlabel:=TextLabel.instantiate() asRichTextLabellabel.text=""add_child(label)
#label.clear() # uncommenting this line will produce the expected behavior in 4.3label.text=""# commenting this line will still produce the expected behavior in 4.2
Tested versions
Reproduced in 4.3-dev4. Not reproducible in 4.2.1-stable.
System information
Windows 11
Issue description
I'm not 100% sure if this is in fact a bug, but it is at the very least an unexpected version incompatibility.
The behaviour of
RichTextLabel.clear()
andRichTextLabel.text = ""
is different between Godot 4.2 and 4.3.The context is instantiating a scene with a single RichTextLabel containing some placeholder text, and then immediately clearing the text when adding the instantiated node to the scene tree (the placeholder text is useful for testing the RichTextLabel scene in isolation).
In Godot 4.2:
clear()
or settingtext = ""
before the node is added to the scene tree (between instantiating a scene and callingadd_child
), the RichTextLabel will appear empty as expected.In Godot 4.3-dev4:
clear()
before the node is added to the scene tree (between instantiating a scene and callingadd_child
), the RichTextLabel still has the placeholder text from the original scene.text = ""
, either before or afteradd_child
, the original text remains visible. This means you essentially have to call bothclear()
and settext = ""
to fully reset the contents.Steps to reproduce
Minimal reproduction project (MRP)
RichTextLabel-Bug-4.3.zip
The text was updated successfully, but these errors were encountered: