Skip to content

Commit ab3eeda

Browse files
authored
Merge pull request #116 from endlessm/static-callable-4.2.1
category_factory: Fix static Callable use in Godot 4.2.1
2 parents ef620ce + 29bef8c commit ab3eeda

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

addons/block_code/ui/picker/categories/category_factory.gd

+4-1
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,10 @@ static func get_categories(blocks: Array[Block], extra_categories: Array[BlockCa
150150
# convert an array type besides Array.assign().
151151
var cats: Array[BlockCategory] = []
152152
cats.assign(cat_map.values())
153-
cats.sort_custom(_category_cmp)
153+
# Accessing a static Callable from a static function fails in 4.2.1.
154+
# Use the fully qualified name.
155+
# https://github.com/godotengine/godot/issues/86032
156+
cats.sort_custom(CategoryFactory._category_cmp)
154157
return cats
155158

156159

0 commit comments

Comments
 (0)