Refactor EditorHelpBit usage

Due to upstream change:

	4e19ab8afe
This commit is contained in:
Wilson E. Alvarez 2024-12-15 17:21:29 -05:00
parent ebc5194dc4
commit 8274ff605f
No known key found for this signature in database
GPG Key ID: A32174A3D2ED3F9E
1 changed files with 2 additions and 9 deletions

View File

@ -68,9 +68,6 @@ Control *TaskButton::_do_make_tooltip() const {
help_symbol = "class|" + task_meta + "|"; help_symbol = "class|" + task_meta + "|";
} }
EditorHelpBit *help_bit = memnew(EditorHelpBit(help_symbol));
help_bit->set_content_height_limits(1, 360 * EDSCALE);
String desc = _module_get_help_description(task_meta); String desc = _module_get_help_description(task_meta);
if (desc.is_empty() && is_resource) { if (desc.is_empty() && is_resource) {
// ! HACK: Force documentation parsing. // ! HACK: Force documentation parsing.
@ -84,14 +81,10 @@ Control *TaskButton::_do_make_tooltip() const {
desc = _module_get_help_description(task_meta); desc = _module_get_help_description(task_meta);
} }
} }
if (desc.is_empty() && help_bit->get_description().is_empty()) { if (desc.is_empty()) {
desc = "[i]" + TTR("No description.") + "[/i]"; desc = "[i]" + TTR("No description.") + "[/i]";
} }
if (!desc.is_empty()) { EditorHelpBitTooltip::show_tooltip(const_cast<TaskButton *>(this), help_symbol, desc);
help_bit->set_description(desc);
}
EditorHelpBitTooltip::show_tooltip(help_bit, const_cast<TaskButton *>(this));
#endif // LIMBOAI_MODULE #endif // LIMBOAI_MODULE
#ifdef LIMBOAI_GDEXTENSION #ifdef LIMBOAI_GDEXTENSION