From cb9c657f598b627e9c67acc3a6db4aad22f1b6bc Mon Sep 17 00:00:00 2001 From: Jonathan G Rennison Date: Thu, 17 Nov 2022 20:43:57 +0000 Subject: [PATCH] Fix selected state of dispatch is/not first/last dropdown in order window --- src/order_gui.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/order_gui.cpp b/src/order_gui.cpp index 1c1031dc3e..e1525cea96 100644 --- a/src/order_gui.cpp +++ b/src/order_gui.cpp @@ -2807,7 +2807,7 @@ public: list.emplace_back(new DropDownListStringItem(STR_ORDER_CONDITIONAL_COMPARATOR_DISPATCH_SLOT_IS_NOT_FIRST, 0x101, false)); list.emplace_back(new DropDownListStringItem(STR_ORDER_CONDITIONAL_COMPARATOR_DISPATCH_SLOT_IS_LAST, 0x102, false)); list.emplace_back(new DropDownListStringItem(STR_ORDER_CONDITIONAL_COMPARATOR_DISPATCH_SLOT_IS_NOT_LAST, 0x103, false)); - int selected = ((o->GetConditionValue() % 2) * 2) + ((o->GetConditionComparator() == OCC_IS_FALSE) ? 1 : 0); + int selected = 0x100 + ((o->GetConditionValue() % 2) * 2) + ((o->GetConditionComparator() == OCC_IS_FALSE) ? 1 : 0); ShowDropDownList(this, std::move(list), selected, WID_O_COND_COMPARATOR, 0, true); break; }