You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-12-02 16:48:55 +00:00
This checks if the class exists or is a global class before checking if it's virtual or instantiable.
It fixes bug #112951.
This commit is contained in:
@@ -5521,7 +5521,13 @@ Ref<Texture2D> EditorNode::_get_class_or_script_icon(const String &p_class, cons
|
||||
}
|
||||
}
|
||||
if (theme.is_valid()) {
|
||||
bool instantiable = !ClassDB::is_virtual(p_class) && ClassDB::can_instantiate(p_class);
|
||||
bool instantiable = false;
|
||||
|
||||
// If the class doesn't exist or isn't global, then it's not instantiable
|
||||
if (ClassDB::class_exists(p_class) || ScriptServer::is_global_class(p_class)) {
|
||||
instantiable = !ClassDB::is_virtual(p_class) && ClassDB::can_instantiate(p_class);
|
||||
}
|
||||
|
||||
return _get_class_or_script_icon(base_type, "", "", false, p_skip_fallback_virtual || instantiable);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user