Skip to content

Commit 3b265c6

Browse files
committed
ensure ready
1 parent 3aa0bbb commit 3b265c6

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

addons/form/nodes/FormLabel.gd

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,9 @@ func _enter_tree():
8484
if !visibility_changed.is_connected(update_display_mode):
8585
visibility_changed.connect(update_display_mode)
8686

87+
func _ready():
88+
indicate_required()
89+
8790
## Update label display mode based on visibility
8891
## If the label is visible and the mode is either Mode.IN_INPUT or Mode.HIDDEN, the mode is set to Mode.SEPARATE.
8992
## If the label is not visible and the mode is Mode.SEPARATE, the mode is set to Mode.HIDDEN.
@@ -99,6 +102,8 @@ func update_display_mode():
99102

100103
## Add or remove the required_hint if input_required
101104
func indicate_required():
105+
if !is_node_ready():
106+
return
102107
# if * needed but not present
103108
if input_required:
104109
if required_hint not in ["", null]&&!text.ends_with(required_hint):

0 commit comments

Comments
 (0)