1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-10 13:00:37 +00:00

Refactor check for overriden methods in inner classes

This commit is contained in:
Alex Drozd
2024-03-26 20:54:14 +01:00
parent 7d151c8381
commit fcb0b8d0bf

View File

@@ -1170,15 +1170,12 @@ void ScriptTextEditor::_update_connected_methods() {
continue; continue;
} }
// Account for inner classes // Account for inner classes by stripping the class names from the method,
if (raw_name.contains(".")) { // starting from the right since our inner class might be inside of another inner class.
// Strip inner class name from the method, and start from the right since
// our inner class might be inside another inner class
int pos = raw_name.rfind("."); int pos = raw_name.rfind(".");
if (pos != -1) { if (pos != -1) {
name = raw_name.substr(pos + 1); name = raw_name.substr(pos + 1);
} }
}
String found_base_class; String found_base_class;
StringName base_class = script->get_instance_base_type(); StringName base_class = script->get_instance_base_type();