Merge pull request #98160 from Rindbee/change-the-parent-node-of-EditorHelpBitTooltip

Add `EditorHelpBitTooltip` as a child of `p_target` to avoid jitter
This commit is contained in:
Thaddeus Crews 2024-11-18 09:23:52 -06:00
commit 91bd80de51
No known key found for this signature in database
GPG Key ID: 62181B86FE9E5D84

View File

@ -3868,7 +3868,7 @@ void EditorHelpBitTooltip::show_tooltip(EditorHelpBit *p_help_bit, Control *p_ta
EditorHelpBitTooltip *tooltip = memnew(EditorHelpBitTooltip(p_target)); EditorHelpBitTooltip *tooltip = memnew(EditorHelpBitTooltip(p_target));
p_help_bit->connect("request_hide", callable_mp(tooltip, &EditorHelpBitTooltip::_safe_queue_free)); p_help_bit->connect("request_hide", callable_mp(tooltip, &EditorHelpBitTooltip::_safe_queue_free));
tooltip->add_child(p_help_bit); tooltip->add_child(p_help_bit);
p_target->get_viewport()->add_child(tooltip); p_target->add_child(tooltip);
p_help_bit->update_content_height(); p_help_bit->update_content_height();
tooltip->popup_under_cursor(); tooltip->popup_under_cursor();
} }