From 0f3fb6dee19ad5374dd458cb4cfd4814416de4bf Mon Sep 17 00:00:00 2001 From: Desour Date: Tue, 24 Jun 2025 00:17:22 +0200 Subject: [PATCH] add comment --- src/gui/guiInventoryList.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/gui/guiInventoryList.cpp b/src/gui/guiInventoryList.cpp index b8ed324c3..82e769102 100644 --- a/src/gui/guiInventoryList.cpp +++ b/src/gui/guiInventoryList.cpp @@ -205,6 +205,9 @@ bool GUIInventoryList::OnEvent(const SEvent &event) bool ret = hovered->OnEvent(event); + // Set visible again *after* processing the event. Otherwise, hovered could + // be another GUIInventoryList, which will call this one again, resulting in + // an infinite loop. IsVisible = was_visible; return ret;