diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/order_gui.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/order_gui.cpp b/src/order_gui.cpp index 4b8a46c94..0645ecb68 100644 --- a/src/order_gui.cpp +++ b/src/order_gui.cpp @@ -1060,8 +1060,8 @@ public: } OrderConditionVariable ocv = order->GetConditionVariable(); /* Set the strings for the dropdown boxes. */ - this->GetWidget<NWidgetCore>(WID_O_COND_VARIABLE)->widget_data = STR_ORDER_CONDITIONAL_LOAD_PERCENTAGE + (order == NULL ? 0 : ocv); - this->GetWidget<NWidgetCore>(WID_O_COND_COMPARATOR)->widget_data = _order_conditional_condition[order == NULL ? 0 : order->GetConditionComparator()]; + this->GetWidget<NWidgetCore>(WID_O_COND_VARIABLE)->widget_data = STR_ORDER_CONDITIONAL_LOAD_PERCENTAGE + ocv; + this->GetWidget<NWidgetCore>(WID_O_COND_COMPARATOR)->widget_data = _order_conditional_condition[order->GetConditionComparator()]; this->SetWidgetDisabledState(WID_O_COND_COMPARATOR, ocv == OCV_UNCONDITIONALLY); this->SetWidgetDisabledState(WID_O_COND_VALUE, ocv == OCV_REQUIRES_SERVICE || ocv == OCV_UNCONDITIONALLY); break; |