You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-04 12:00:25 +00:00
EditorHelpBit: Workaround crash renaming named class inheriting @tool class
This only addresses the symptom, not the root cause of the problem. In the MRP of the linked issue, the parent class seems to not be found in DocData after renaming its child class, which seems weird. Force opening the docs of the parent class can work it around, so we seem to have inconsistent state. Changed the same code in EditorHelp for good measure. Fixes #102718.
This commit is contained in:
@@ -1017,7 +1017,8 @@ void EditorHelp::_update_doc() {
|
||||
class_desc->add_text(nbsp); // Otherwise icon borrows hyperlink from `_add_type()`.
|
||||
_add_type(inherits);
|
||||
|
||||
inherits = doc->class_list[inherits].inherits;
|
||||
const DocData::ClassDoc *base_class_doc = doc->class_list.getptr(inherits);
|
||||
inherits = base_class_doc ? base_class_doc->inherits : String();
|
||||
|
||||
if (!inherits.is_empty()) {
|
||||
class_desc->add_text(" < ");
|
||||
@@ -3713,7 +3714,8 @@ void EditorHelpBit::_update_labels() {
|
||||
|
||||
_add_type_to_title({ inherits, String(), false });
|
||||
|
||||
inherits = class_list[inherits].inherits;
|
||||
const DocData::ClassDoc *base_class_doc = class_list.getptr(inherits);
|
||||
inherits = base_class_doc ? base_class_doc->inherits : String();
|
||||
}
|
||||
|
||||
title->pop(); // font_size
|
||||
|
||||
Reference in New Issue
Block a user