Fixes an issue with calculating the hover stack which resulted in #324

Fixes #324 
Co-authored-by: Dennis Ploeger <develop@dieploegers.de>
Co-authored-by: dploeger <dploeger@users.noreply.github.com>
This commit is contained in:
Dennis Ploeger
2021-07-28 09:51:48 +02:00
committed by GitHub
parent 49749980f9
commit 29d594e43f
3 changed files with 5 additions and 4 deletions

View File

@@ -120,9 +120,9 @@ func _on_mouse_entered_item(item: ESCItem) -> void:
escoria.logger.info("Item focused: ", [item.global_id])
_clean_hover_stack()
if !hover_stack.empty():
if item.z_index > hover_stack.back().z_index:
hover_stack.insert(hover_stack.size()-1, item)
if not hover_stack.empty():
if item.z_index < hover_stack.back().z_index:
hover_stack.insert(hover_stack.size() - 1, item)
else:
hover_stack.push_back(item)
else: