Allow negative indexes in ItemList and PopupMenu

This commit is contained in:
kobewi 2022-03-12 01:06:45 +01:00
parent d5076439e4
commit 42078dec9f
25 changed files with 163 additions and 59 deletions

View file

@ -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;
}
}