summaryrefslogtreecommitdiff
path: root/editor/plugins/asset_library_editor_plugin.cpp
diff options
context:
space:
mode:
authorkobewi <kobewi4e@gmail.com>2022-03-12 01:06:45 +0100
committerkobewi <kobewi4e@gmail.com>2022-03-12 01:14:03 +0100
commit42078dec9f592243209f845766409d01c12ac525 (patch)
treed73198d40081021ae8ab945d58b4482378869c7b /editor/plugins/asset_library_editor_plugin.cpp
parentd5076439e44e6eab5732e1d2fc0f30bb6f34e5f9 (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.cpp2
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;
}
}