You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
have two vehicles with shared orders
open the list of all vehicles with this shared order
edit the orders of one of the vehicles
remove all orders from this vehicle (except the "end of shared orders" item)
The current code is broken by design. It assumes orders are shared if v->orders->index match, while this is NOT the case.
Orders are shared IF v->next_shared OR v->prev_shared is not NULL.
Also if the 'shared orders' line is deleted, the window stays open with one vehicle. One could debate whether this is wrong or not.
Unfortunately with the current cludge of assigning the order/station/etc to window_number you cannot store the Order* pointer in there which would be the correct choice.
Perhaps best choice for now would be to delete the window if list is empty?
The assert() in fact is simple to resolve, by making the system consistent: close the window when there are no orders. As you can't open the list either when there are no orders, this adds consistent. Of course it is far from what we really want, but it works for now.
Eddi opened the ticket and wrote:
Reported version: trunk
Operating system: All
This issue was imported from FlySpray: https://bugs.openttd.org/task/542
The text was updated successfully, but these errors were encountered: