FS#6302 - Window position jumps after being moved if "timetable" or "orders" is clicked

Attached to Project: OpenTTD
Opened by One Shot (oneshot) - Wednesday, 20 May 2015, 14:12 GMT
Last edited by andythenorth (andythenorth) - Thursday, 31 August 2017, 17:48 GMT
Type Feature Request
Category Interface
Status With patch
Assigned To No-one
Operating System Mac OS X
Severity Low
Priority Normal
Reported Version 1.5.0
Due in Version Undecided
Due Date Undecided
Percent Complete 0%
Votes 0
Private No


OSX 10.10.3

If a vehicle's order window is moved from the position where it was spawned then clicking on the toggle between "Orders" and "Timetable" causes the entire window to jump back to the place where the window was first spawned.

To reproduce:

Click any vehicle (train, road, plane, [ships?])
In the viewport that appears click the arrow "Show Vehicle Orders"
Click "Timetable"
The window jumps back to the initial spawn position
Move it again
Click "Orders"
The Window jumps back again to the inital spawn position

It's pretty annoying. Other windows don't exhibit this behavior.
This task depends upon

Comment by Alberth (Alberth) - Wednesday, 20 May 2015, 16:59 GMT
It's not the same window, the timetable window and the order window are two different windows, and they both spawn (mostly?) at the same place relative to the vehicle window they belong to.

So while it may look like the same window jumping back to you, in fact the 'old' window is closed, and a new (different one) opens at a similar position as the previous one was opened.
Comment by One Shot (oneshot) - Wednesday, 20 May 2015, 17:15 GMT
I see. The effect, however, is that of a transformation from one window to the next even though under the covers it is one window closing and another opening.

From a UI perspective, it seems that the window refuses to stay where I take the time to specifically place it.

If I move that window elsewhere why is that explicit order disregarded and a new window respawned on top of the vehicle viewport window? I instantly have to track down the new window to continue my work, followed by repositioning it all over again. This quickly becomes tiresome.

I imagine, if this is not a bug that there is a good reason for this behavior but it is opaque to me. And given the deep customizability of this game it seems like the imposition of an arbitrary UI quirk.
Comment by Peter Nelson (peter1138) - Monday, 13 March 2017, 23:47 GMT
Here's a nasty patch that pretends it is the same window and repositions and resizes based on the 'other' window if it's open. It's a horrible hack!