diff options
author | kobewi <kobewi4e@gmail.com> | 2022-03-12 01:06:45 +0100 |
---|---|---|
committer | kobewi <kobewi4e@gmail.com> | 2022-03-12 01:14:03 +0100 |
commit | 42078dec9f592243209f845766409d01c12ac525 (patch) | |
tree | d73198d40081021ae8ab945d58b4482378869c7b /editor/plugins/asset_library_editor_plugin.cpp | |
parent | d5076439e44e6eab5732e1d2fc0f30bb6f34e5f9 (diff) |
Allow negative indexes in ItemList and PopupMenu
Diffstat (limited to 'editor/plugins/asset_library_editor_plugin.cpp')
-rw-r--r-- | editor/plugins/asset_library_editor_plugin.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/editor/plugins/asset_library_editor_plugin.cpp b/editor/plugins/asset_library_editor_plugin.cpp index 50f253b167..fd9b665b20 100644 --- a/editor/plugins/asset_library_editor_plugin.cpp +++ b/editor/plugins/asset_library_editor_plugin.cpp @@ -1145,7 +1145,7 @@ void EditorAssetLibrary::_http_request_completed(int p_status, int p_code, const String name = cat["name"]; int id = cat["id"]; categories->add_item(name); - categories->set_item_metadata(categories->get_item_count() - 1, id); + categories->set_item_metadata(-1, id); category_map[cat["id"]] = name; } } |