From c7f69717297119d3b694dab42deb185bedc1e183 Mon Sep 17 00:00:00 2001 From: Peter Nelson Date: Wed, 24 Dec 2025 19:41:20 +0000 Subject: [PATCH] Fix c213218b66: Don't highlight selected dropdown item if it has a click result. This is used by toggles and buttons within the dropdown item, and using those should not cause the row to look selected. --- src/dropdown.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dropdown.cpp b/src/dropdown.cpp index 40c47a0fd5..4889973141 100644 --- a/src/dropdown.cpp +++ b/src/dropdown.cpp @@ -283,7 +283,7 @@ struct DropdownWindow : Window { if (y > -item_height) { Rect full = ir.Translate(0, y).WithHeight(item_height); - bool selected = (this->selected_result == item->result) && item->Selectable(); + bool selected = (this->selected_result == item->result) && item->Selectable() && this->selected_click_result < 0; if (selected) GfxFillRect(full, PC_BLACK); item->Draw(full, full.Shrink(WidgetDimensions::scaled.dropdowntext, RectPadding::zero), selected, selected ? this->selected_click_result : -1, colour);