# HG changeset patch # Parent 70c136c3794bd8b6d405b366161ee0a1f679717d diff -r 70c136c3794b src/order_gui.cpp --- a/src/order_gui.cpp Tue Oct 08 17:45:17 2013 +0000 +++ b/src/order_gui.cpp Wed Oct 09 18:25:02 2013 +0200 @@ -496,6 +496,7 @@ private: /** Under what reason are we using the PlaceObject functionality? */ enum OrderPlaceObjectState { + OPOS_NONE, OPOS_GOTO, OPOS_CONDITIONAL, OPOS_SHARE, @@ -818,6 +819,7 @@ this->selected_order = -1; this->order_over = INVALID_VEH_ORDER_ID; + this->goto_type = OPOS_NONE; this->owner = v->owner; this->UpdateAutoRefitState(); @@ -1197,7 +1199,6 @@ switch (widget) { case WID_O_ORDER_LIST: { if (this->goto_type == OPOS_CONDITIONAL) { - this->goto_type = OPOS_GOTO; VehicleOrderID order_id = this->GetOrderFromPt(_cursor.pos.y - this->top); if (order_id != INVALID_VEH_ORDER_ID) { Order order; @@ -1499,6 +1500,7 @@ virtual void OnPlaceObjectAbort() { + this->goto_type = OPOS_NONE; this->RaiseWidget(WID_O_GOTO); this->SetWidgetDirty(WID_O_GOTO);