Item_list_ensure_current_is_visible scrolls the scrolling but the icons does not move

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Dadango
:warning: Old Version Published before Godot 3 was released.

my code looks like this for the itemlist : (“inventory” being the itemlist)

if inventory.is_selected(i) and inventory.get_item_metadata(i).size() == 10: #
	inventory.ensure_current_is_visible()
	highest_value_dice = inventory.get_item_metadata(i)[2]
	lowest_value_dice = inventory.get_item_metadata(i)[1]
	attack_range = inventory.get_item_metadata(i)[9]
	now_wielding = inventory.get_item_text(i)

This is under the “on_ItemLis_item_activated” func and everything works great.
Here is the issue:
Screenshot by Lightshot - once items have been picked up the scroll appears as it should
Screenshot by Lightshot - doubble tapping then “activates” the item and inventory.ensure_current_is_visible() runs. The scroll also moves but the items stand still.
Screenshot by Lightshot - clicking once more on the item will give the result I was looking for, where the full item name and icon are revealed and the scroll appears to work.

Hope this makes sense, It seems like a bug or something of the like, so I probably won’t need this to work “better”, but thought I’d show it anyway in case it is a bug :slight_smile:

Have a nice day

ERROR: Vector::operator : Condition ’ p_index<0 || p_index>=size() ’ is true. returned: aux
At: c:\projects\godot-builds\godot\core\vector.h:132

I also just got this error in the CMD that opens with Godot. It happens when I remove the final item in the itemlist, which apparently crashes the game. Sometimes the semifinal item does it aswell. Weird :slight_smile:

Dadango | 2017-02-15 15:11

:bust_in_silhouette: Reply From: Zylann

If you know this is a bug, please don’t use QA to report it. You should post this in a place where developers will see it, here: Issues · godotengine/godot · GitHub

I am unsure if it is supposed to be like that or a bug, I’m still sorta new, so didn’t want to waste dev time. But I’ll post it there right away!

Dadango | 2017-02-15 19:16