fix: prevent fur color picker dismissal crash
This commit is contained in:
parent
3d086b19e4
commit
41308768b7
2 changed files with 16 additions and 1 deletions
|
|
@ -384,6 +384,19 @@ func _validate_fur_color_ui(snapshot: Dictionary) -> void:
|
|||
"panel"
|
||||
) as StyleBoxFlat
|
||||
assert(first_swatch_style.bg_color.is_equal_approx(live_custom_color))
|
||||
picker_popup.popup_centered()
|
||||
for _frame: int in 2:
|
||||
await process_frame
|
||||
picker_popup.hide()
|
||||
for _frame: int in 3:
|
||||
await process_frame
|
||||
assert(is_instance_valid(picker))
|
||||
assert(picker.is_inside_tree())
|
||||
assert(
|
||||
profile_page.find_child(
|
||||
"FurCustomColorPicker", true, false
|
||||
) == picker
|
||||
)
|
||||
profile_page.free()
|
||||
await process_frame
|
||||
|
||||
|
|
|
|||
|
|
@ -1616,7 +1616,9 @@ func _build_fur_palette(
|
|||
custom_picker.color_changed.connect(
|
||||
_select_custom_fur_color.bind(category_id)
|
||||
)
|
||||
custom_picker.popup_closed.connect(_refresh_options)
|
||||
# Custom colors update the channel, preview, and actions live. Rebuilding the
|
||||
# option tree from popup_closed destroys this button and its native popup
|
||||
# while Godot is still dispatching the hide operation, which can crash.
|
||||
UtilityPageStyle.apply_compact_ocean_button(custom_picker)
|
||||
_round_fur_color_picker_button(custom_picker)
|
||||
_theme_fur_color_picker_popup(custom_picker)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue