From 122158b4d857e50d7d4dd4cd41dc0a8f7a077ae3 Mon Sep 17 00:00:00 2001 From: planetmaker Date: Sun, 13 Oct 2013 11:06:58 +0000 Subject: [PATCH] (svn r25859) -Add [FS#5784]: Hightlight active goto item in order list dropdown (adf88) --- src/order_gui.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/order_gui.cpp b/src/order_gui.cpp index 231e5938f7..a86e7f5fa3 100644 --- a/src/order_gui.cpp +++ b/src/order_gui.cpp @@ -1275,7 +1275,15 @@ public: if (this->GetWidget(widget)->ButtonHit(pt)) { this->OrderClick_Goto(); } else { - ShowDropDownMenu(this, this->vehicle->type == VEH_AIRCRAFT ? _order_goto_dropdown_aircraft : _order_goto_dropdown, 0, WID_O_GOTO, 0, 0); + int sel; + switch (this->goto_type) { + case OPOS_NONE: sel = -1; break; + case OPOS_GOTO: sel = 0; break; + case OPOS_CONDITIONAL: sel = 2; break; + case OPOS_SHARE: sel = 3; break; + default: NOT_REACHED(); + } + ShowDropDownMenu(this, this->vehicle->type == VEH_AIRCRAFT ? _order_goto_dropdown_aircraft : _order_goto_dropdown, sel, WID_O_GOTO, 0, 0); } break;