From 7893338b6773ff33009482448a499d69626d82cf Mon Sep 17 00:00:00 2001 From: GHOST11111100 Date: Sun, 27 Jul 2025 00:29:23 +0300 Subject: [PATCH] fix: update tooltip handling to display caption only when description is empty --- src/graphics/ui/elements/InventoryView.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/graphics/ui/elements/InventoryView.cpp b/src/graphics/ui/elements/InventoryView.cpp index 38361857..2b7dc270 100644 --- a/src/graphics/ui/elements/InventoryView.cpp +++ b/src/graphics/ui/elements/InventoryView.cpp @@ -152,7 +152,11 @@ void SlotView::refreshTooltip(const ItemStack& stack, const ItemDef& item) { ); } - tooltip = captionText + L"\n" + descriptionText; + if (descriptionText.length() > 0) { + tooltip = captionText + L"\n" + descriptionText; + } else { + tooltip = captionText; + } } else { tooltip.clear(); }